-
Notifications
You must be signed in to change notification settings - Fork 210
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 "typings" field to package.json #251
Comments
Thanks @letmaik I was not aware of this. I've looked at the docs you listed and related issues on the TypeScript github page. Because If I understand correctly the declare module "chevrotain" {} needs to be removed as well. Hopefully it is enough to just change Chevrotain's d.ts to use one the modern module template Did the existing chevrotain.d.ts work on VSCode after you have manually added the "typings" property ? |
I've tried doing as you have suggested. https://travis-ci.org/SAP/chevrotain/jobs/150854082
it does work with the new UMD module template syntax. I do not think it is worth the bother right now to create another hacked d.ts file (or more than one). I will try to create a push request that solves this (using typescript 2 beta) but will only merge once |
Uses UMD module syntax which only works with typescript 2+ Use typings property in package.json relates to #251
Thanks for investigating this! I don't have much experience with definition files myself yet. Your plan sounds good, version 2 is just a few weeks away. As a work-around, it seems to be enough to just copy the chevrotain.d.ts file somewhere in the project so that the compiler finds it. |
@letmaik No Problem. And thanks for the feedback. now I know about the "typings" package.json property |
fixed in will be available in next version. |
The
package.json
file should contain a"typings"
field as described here. Then IDEs like Visual Studio Code will automatically find the typing information.So, that should be:
The text was updated successfully, but these errors were encountered: