Closed baileyherbert closed 5 years ago
Thank you @baileyherbert !
I'm not a TypeScript user. Could anyone please help with reviewing these changes?
No problem, @yuanchuan. In the mean time I have updated the PR with better screenshots and a more thorough explanation. Cheers!
Merged, thanks!
This pull request:
Adds a default export so TypeScript users can import it with
import
and notrequire
. This is important because packages imported via require() do not have intellisense in TS.Adds a type definition file which will enable intellisense in supported editors (Visual Studio Code, Atom, and WebStorm to name a few). The function signature shows in both JavaScript and TypeScript projects, but the full intellisense of course works best in real TypeScript projects.
Function signature:
Intellisense:
Each item is fully documented:
Full error checking: