Closed WangNianyi2001 closed 1 year ago
@WangNianyi2001 try yarn add --dev @types/numjs
Unfortunately types not perfectly working, lots of weird errors, but at least something
file:///C:/Users/johnd/ml/test/temp.js:8 ones, ^^^^ SyntaxError: Named export 'ones' not found. The requested module 'numjs' is a Co mmonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example usin g:
As mentioned in issue #107, current
numjs
doesn't play well with ES6 module syntax. For example, trying to importing the whole package into an object will not work:And importing it directly will result in an error:
The package is still using CommonJS-fashioned
require
&module.exports
and is not supporting ES6 module at all! Please consider make it compatible with modules or provide another module-specified package.