microsoft / TypeScript-Handbook

Deprecated, please use the TypeScript-Website repo instead
https://github.com/microsoft/TypeScript-Website
Apache License 2.0
4.88k stars 1.13k forks source link

"files" property overwrites "types" property #1130

Closed wederer closed 4 years ago

wederer commented 4 years ago

https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#including-declarations-in-your-npm-package describes the "types|typings" property, but forgets to mention, that the "files" property has priority. Thus the declaration file is not included when running npm pack.

This has already happened in a package we are using in our project: https://github.com/keycloak/keycloak-nodejs-connect/commit/eeaccdce5d4318cdedc3bc8c38f5038e735a74a4

I will submit a pull request to add a note in the docs.