-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TypeScript description of API #22
base: main
Are you sure you want to change the base?
Conversation
3b6ceb4
to
905cc47
Compare
Hi @Alexander255, Many thanks for the PR 👍 I'm not (yet) familiar with TypeScript, so I'm not sure how to add a test for this or even if it would be needed... 😊 Would we also need to add a "types": "./psl.d.ts" Can you please provide instructions on how to use/test this for a complete TS noob? I'd be more than happy to accept the contribution, but would like to understand it first 🐵 Best, L |
b916b03
to
2959ab3
Compare
Sorry for the late reply! I've been updating the TypeScript file based on the recommendations here and here.
Indeed, and this has been added now.
You should be able to simply create a new JS project, add
Understandable! The unit test fail btw, because |
ad testing: Currently the automated tests only check whether the |
Any progress? |
Hi! I've been using your library for a while and I've recently started to use the TypeScript type checker for my project and noticed that your library has no description and quickly wrote one that gets the job done (both UMD and browser should work, but I only tested the later).
If you're interested in this please make a new release that includes this file and push it to NPM so that the introspection and typing features offered by TypeScript will start to just work for people using that. If not, then feel free to just turn down this PR. I won't be offended or anything. 🙂