Open bruceborrett opened 9 months ago
Sorry for the lack of information in this PR.
The issue I was having was when I tried to import an IO package in my project I would get the following error:
Could not find a declaration file for module '@jscad/stl-serializer'. Try
npm i --save-dev @types/jscad__stl-serializer
if it exists or add a new declaration (.d.ts) file containingdeclare module '@jscad/stl-serializer';
Simply adding the module declaration resolved the error, Im not sure if this is the best way to solve this but may be a good enough interim solution until proper Typescript support is added?
I added a seperate types directory as I noticed that is the way it was done in the regl-renderer package, did not check the other packages, I can move it to src/index.d.ts if you prefer?
Simply adding the module declaration resolved the error, Im not sure if this is the best way to solve this but may be a good enough interim solution until proper Typescript support is added.
After adding this interim solution, was there any typing available for the deserialize / serialize functions? Were you able to use the exports of the IO packages?
@bruceborrett sorry. that was a question for you. Were you able to import and use the IO libraries after these definitions were added?
Also, please move the type definitions into src/index.d.ts
@bruceborrett Sorry. Can you move the changes to src/index.d.ts ?
All Submissions:
Thank you for your help in advance, much appreciated !