Skip to content
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

Closed
wants to merge 2 commits into from
Closed

Typings for npm packages #1933

wants to merge 2 commits into from

Conversation

falsandtru
Copy link

@boneskull
Copy link
Member

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

@danielstjules
Copy link
Contributor

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) :)

@falsandtru
Copy link
Author

Thanks for your response. I changed to maintenance-free model. You can update from DefinitelyTyped by $ dtsm update --save. However, I should update type definition files of DefinitelyTyped before merge this PR. This is advanced type management model. Please include type info, if possible.

@danielstjules
Copy link
Contributor

I still don't understand why this needs to be shipped with mocha at all?

@falsandtru
Copy link
Author

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.

@danielstjules
Copy link
Contributor

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:

npm install mocha --save-dev
tsd query mocha --save --action install

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.

@falsandtru
Copy link
Author

Okay, thanks for your response.

@danielstjules
Copy link
Contributor

Sorry to sound harsh. I hope the proposed solution makes sense though!

@boneskull
Copy link
Member

@danielstjules hey, at least you have a solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants