This PR adds types for the ndarray library to the node and web package.
I've run into the following error when using the package and this should hopefully fix the error when compiling typescript:
../../node_modules/@imgly/background-removal/dist/codecs.d.ts:2:25 - error TS7016: Could not find a declaration file for module 'ndarray'. '/.../node_modules/ndarray/ndarray.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/ndarray` if it exists or add a new declaration (.d.ts) file containing `declare module 'ndarray';`
2 import { NdArray } from 'ndarray';
~~~~~~~~~
../../node_modules/@imgly/background-removal/dist/utils.d.ts:2:25 - error TS7016: Could not find a declaration file for module 'ndarray'. '/.../node_modules/ndarray/ndarray.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/ndarray` if it exists or add a new declaration (.d.ts) file containing `declare module 'ndarray';`
2 import { NdArray } from 'ndarray';
~~~~~~~~~
Found 2 errors in 2 files.
Errors Files
1 ../../node_modules/@imgly/background-removal/dist/codecs.d.ts:2
1 ../../node_modules/@imgly/background-removal/dist/utils.d.ts:2
error Command failed with exit code 2.
This PR adds types for the ndarray library to the node and web package.
I've run into the following error when using the package and this should hopefully fix the error when compiling typescript: