-
Notifications
You must be signed in to change notification settings - Fork 92
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
Why not use declare module
typings?
#269
Comments
This might be worth a fork |
I'd always be in favor of making these types easier for end users to adopt in their projects. If either of you ( @btonasse, @pauldraper) have explored this in a fork, feel free to suggest a PR? Have we previously considered adding this to DefinitelyTyped? If so, why isn't this there? If not, it's worth looking into. |
Sounds interesting, I don't know if it was ever considered, we'd have to ask @johnogle222 |
I am far from qualified to comment on the best way to declare typescript definitions these days. There's no particular reason why this project is setup using the conventions that it is other than it worked for me at the time and others grew it from there. If there is a better way to structure it that makes the project easier to adopt and use then by all means don't let me get in the way :) |
Hi @ShawnTalbert I'm also far from a typescript expert, so I don't know if anything I did there is good practice, but I actually did create a fork: https://github.com/btonasse/suitescript-types |
Re "best practice": The most user-friendly thing to do is to get types in https://github.com/DefinitelyTyped/DefinitelyTyped, as Similar to |
Path mappings work, but are rarely used since every downstream TypeScript project also has to set them.
More typical is module declarations.
These are then added by one of:
@types
as a npm alias (or having the project in DefinitelyTyped to begin with)typeRoots
./// <reference types="..." />
Note that module declarations is how Node.js typings work (
@types/node
).The text was updated successfully, but these errors were encountered: