Skip to content

Conversation

@brunokrebs
Copy link
Contributor

Adding Typescript type definition.

@brunokrebs
Copy link
Contributor Author

No no no, apparently not working. Closing till I figure it out the correct way.

@brunokrebs brunokrebs closed this Apr 17, 2017
@brunokrebs brunokrebs reopened this Apr 17, 2017
@brunokrebs
Copy link
Contributor Author

Not that hard! @types/express-jwt dependency was in the wrong place.

"main": "lib/index.js",
"types": "index.d.ts",
"dependencies": {
"@types/express-jwt": "0.0.34",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not in devDependencies?

Copy link
Contributor Author

@brunokrebs brunokrebs Apr 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DevDependencies of dependencies are not installed along. That is, if I have a TypeScript project that has jwks-rsa as a dependency, @types/express-jwt will not get installed if it is defined as a devDependency instead of as a denpendency. Then the project won't compile and the developer will have to manually install @types/express-jwt.

My first attempt was to configure it as a devDependency, but it didn't work. Also, the publishing page on the TypeScript documentation states that the developer has to:

Make sure all the declaration packages you depend on are marked appropriately in the "dependencies" section in your package.json.

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