Merge TypeScript declarations into repo
See original GitHub issueFirst of all big kudos out for this great piece of software! I don’t know what I would do without it.
Now considering the recent growth of TypeScript usage across the JS / node eco system and the revival of static typing in general: Would you consider a PR that merges the definitely-typed TS declarations into the main repo?
Background
- It’s tricky to keep the typings package version and the actual package’s version in sync over
- Not only for TypeScript users, but also for useful hints in the IDE
- Coherence: Keep together what’s tightly coupled
- Submitting a PR to that beast of definitely typed monorepo is a nightmare
- One
npm install
instead of two
Let me know what you think 😃
Happy holidays!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:26
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Documentation - Declaration Merging - TypeScript
For the purposes of this article, “declaration merging” means that the compiler merges two separate declarations declared with the same name into a...
Read more >Declaration merging in TypeScript for regular devs - Merixstudio
In TypeScript, when two separate declarations with the same name are being merged into a single definition, it is called declaration merging. It ......
Read more >TypeScript Tips Part II: Declaration Merging - Just Some Dev
Declaration merging has been around for a while now in TypeScript. In a nutshell it lets you merge definitions of types.
Read more >Merge interface from namespace in module declaration file
I would like to extend the Document interface in a completely separate typescript library: https://github.com/CrossLead/tyranid-gracl which ...
Read more >Type merging for imported types only works if the ... - GitHub
In typings_module: vars.d.ts: interface UserProperties { } declare global { const ... Typescript declarations tmedwards/sugarcube-2#45.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
typescript +1
You may find this helpful:
https://github.com/sindresorhus/typescript-definition-style-guide
I was specifically interested in the testing recommendations:
https://github.com/sindresorhus/typescript-definition-style-guide#testing
Maintaining types is usually doable for a maintainer that doesn’t use types day to day. But I do think having some form of testing consideration should be mandatory for including types in repos. Separate types have no implied guarantee of fitness for every version but I would be uncomfortable including source code in the repo that’s untested.