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

Added in Typescript Typings #8

Merged
merged 1 commit into from
Oct 10, 2018
Merged

Conversation

csprance
Copy link
Contributor

Added in typescript typings for the main exported default function getOpts.

This will help with people using the lib in typescript.

@Alhadis Alhadis merged commit 141dddb into Alhadis:master Oct 10, 2018
@Alhadis
Copy link
Owner

Alhadis commented Oct 10, 2018

Thanks for this! 👍 I'll cut a release soon.

@Alhadis
Copy link
Owner

Alhadis commented Oct 10, 2018

@csprance Quick question before I publish; should I add this file to the package's files array? I'm not that familiar with TypeScript, but I'm guessing the index.d.ts file needs to be distributed along with index.js for it to be useful.

@csprance
Copy link
Contributor Author

Hmm good question. As far as I know typescript only cares if it's defined in the typings file in the package.json.

It's really only for development so I wouldn't imagine it would need to be listed in files.

@Alhadis
Copy link
Owner

Alhadis commented Oct 10, 2018

Thing is, the files array is an exclusive list of every file that gets published on NPM (not counting README.md, CHANGELOG.md and license files). So the typings file itself would actually be missing after install...

@csprance
Copy link
Contributor Author

ok then yes :) it needs to be included

@Alhadis
Copy link
Owner

Alhadis commented Oct 10, 2018

Perfect. Thanks!

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.

2 participants