-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Typings for npm packages #1933
Typings for npm packages #1933
Conversation
Thanks for the PR. I don't have any interest in whatever this is or maintaining it, however. If another maintainer does, please pipe up. cc @mochajs/mocha |
Could the type definitions not be moved to https://github.com/borisyankov/DefinitelyTyped? It doesn't make sense to add these types of files in Mocha, since they're language-specific (TypeScript, Flow, anybody else who decides to do static analysis in JS) :) |
Thanks for your response. I changed to maintenance-free model. You can update from DefinitelyTyped by |
I still don't understand why this needs to be shipped with mocha at all? |
These files are for statically typed programmings using JavaScript. We should move to source repositories from DefinitelyTyped. Here is a final destination of type definition files. |
I realize that, but my point is that they shouldn't need to be added to this repo. If you'd like to use mocha with a new typescript project, I'd just:
Then write your tests as you normally would: <reference path="../typings/mocha/mocha.d.ts" />
describe('suite', function() {
//...
}); If we were to make an exception for typescript, we'd need to do the same for flow, and any other language that tries to improve the type system. |
Okay, thanks for your response. |
Sorry to sound harsh. I hope the proposed solution makes sense though! |
@danielstjules hey, at least you have a solution! |
Resolve typings of node modules.
https://github.com/Microsoft/TypeScript/wiki/Typings-for-npm-packages