I installed mathjs
globally using npm:
npm install -g mathjs
When I write code like the below in VS Code, intellisense does not work for mathjs so I cannot see the methods or attributes in the dropdown list when I press .
:
/*
why does the intellisense not work for mathjs ?
*/
const mathjs = require('mathjs') // intellisense does not work
const fs = require('fs') // intellisense does work
let m = mathjs.mean([1,2,3,4,5]) // the actual module method works fine !
let n = Math.max(1,2,3,4,5) // the intelisense works fine here too.
console.log(m)
console.log(n)
Points to note:
- the methods do work for
mathjs
, just not intellisense - intellisense works for other imported modules (e.g.
require('fs')
) - intellisense in the
Math
module also works
It seems to be specifically isolated to this one module. How can I get the intellisense working for mathjs
?