The document page at https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html
Suggests that if your project isn't TypeScript then publishing to the @types organization on npm is the preferred approach.
Search Terms
DefinitelyTyped
@types
Suggestion
This suggestion seems objectively wrong to me, and is not supported by anything other than the word "recommended"
I suggest either say why it's recommended or, preferably, replace it and suggest that publishing to @types organisation should always be avoided if there's a project that already exists to support it.
I don't know of any sound reason to support the current "recommendation" but I can think of many reasons not to ie Why would you:
1 - Break up a single project into 2 parts (typings/actual)
2 - Force users of the library to figure out and use 2 commands (actual + typings) to install a single library
Libraries like Vue js do as I suggested and remove their @types library after including it in their main project
Can anyone provide a sound reason why a project should be split into two, just for TypeScript typings, to support this recommendation?
The document page at https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html
Suggests that if your project isn't TypeScript then publishing to the @types organization on npm is the preferred approach.
Search Terms
DefinitelyTyped
@types
Suggestion
This suggestion seems objectively wrong to me, and is not supported by anything other than the word "recommended"
I suggest either say why it's recommended or, preferably, replace it and suggest that publishing to @types organisation should always be avoided if there's a project that already exists to support it.
I don't know of any sound reason to support the current "recommendation" but I can think of many reasons not to ie Why would you:
1 - Break up a single project into 2 parts (typings/actual)
2 - Force users of the library to figure out and use 2 commands (actual + typings) to install a single library
Libraries like Vue js do as I suggested and remove their @types library after including it in their main project
Can anyone provide a sound reason why a project should be split into two, just for TypeScript typings, to support this recommendation?