ocean.js icon indicating copy to clipboard operation
ocean.js copied to clipboard

Add a type declaration file

Open jamiehewitt15 opened this issue 5 months ago • 2 comments

If you try and use ocean.js from another typescript project in strict mode, you will get this error:

Could not find a declaration file for module '@oceanprotocol/lib'. '/home/jamie/Desktop/ocean/vscode-extension/node_modules/@oceanprotocol/lib/dist/lib.js' implicitly has an 'any' type.

Try `npm i --save-dev @types/oceanprotocol__lib` if it exists or add a new declaration (.d.ts) file containing `declare module '@oceanprotocol/lib';`ts(7016)

We don't have a type declaration file so there there is no easy way round this for developers.

jamiehewitt15 avatar Sep 18 '24 11:09 jamiehewitt15