You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've used npm install to add hyperform to a project that uses Typescript. If I then write something like:
let hf: Hyperform = hyperform(document.forms[0]);
typing hf as either Hyperform or HyperformStatic my IDE complains about it. Looking into the package under node_modules I can see in package.json there is a types node pointing to "index.d.ts" but this is nowhere to be found in the folder, or in @types.
Am I doing something wrong or...?
Thanks!
The text was updated successfully, but these errors were encountered:
Thank you for pointing this out! Yes, the index.d.ts file was indeed missing from the npm package. If you update to hyperform@0.12, it will be included.
A word of warning: I don’t use TypeScript myself yet. The index.d.ts might therefore not be correct or fully functional. If you encounter any issue, I’d love to hear it (and fix it then, of course 😃 ).
Thanks @Boldewyn. I'm only just beginning myself, which makes it hard to sort my errors from other problems. I've updated and it has the index.d.ts in there now. For some reason it's not picking up correctly from node_modules, and still not believing there is a valid type, but I suspect it's something I'm doing wrong. I'll try again tomorrow and get back to you if I find any issues. Thanks again for looking at this so quickly.
I've got it picking up the file, but I've had to resort to using the "any" type on Hyperform as the type file doesn't seem to match up with the script. I've had a go at rewriting it but my knowledge isn't up to the task yet.
Hi,
I've used npm install to add hyperform to a project that uses Typescript. If I then write something like:
let hf: Hyperform = hyperform(document.forms[0]);
typing hf as either Hyperform or HyperformStatic my IDE complains about it. Looking into the package under node_modules I can see in package.json there is a types node pointing to "index.d.ts" but this is nowhere to be found in the folder, or in @types.
Am I doing something wrong or...?
Thanks!
The text was updated successfully, but these errors were encountered: