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

Add support for TypeScript #42

Merged
merged 1 commit into from
Oct 6, 2016
Merged

Add support for TypeScript #42

merged 1 commit into from
Oct 6, 2016

Conversation

ryanwe
Copy link
Contributor

@ryanwe ryanwe commented Oct 6, 2016

Explicitly ignore any type declaration files. While not explicitly a problem, this causes issues when running TypeScript via ts-node. See TypeStrong/ts-node#207 for more details.

- explicitly ignore any type declaration files
@aseemk
Copy link
Owner

aseemk commented Oct 6, 2016

Thank you! 🙏

@aseemk aseemk merged commit 793d794 into aseemk:master Oct 6, 2016
@brandonros
Copy link

What about adding an index.d.ts file to the root directory of the repo so that it is possible to import * as requireDir from 'require-dir'?

@yocontra
Copy link
Collaborator

@brandonros Haven't seen that done before, don't think that is necessary

@brandonros
Copy link

It is. Try to import * as requireDir from 'require-dir' from any TypeScript project. It will throw an error about a lacking module declaration. You can either add it to the repo like https://github.com/axios/axios/blob/master/index.d.ts or create @types/require-dir (like https://www.npmjs.com/package/@types/express)

@yocontra
Copy link
Collaborator

@brandonros Yep typings I understand - I would rather go that route. I don't use typescript, but if somebody else wants to do them it should be a pretty simple API to model.

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.

4 participants