Is there another way to distribute typings.d.ts?
See original GitHub issueTypeScript as a dev dependency adds 33MB to node_modules
. I want to support TypeScript, but I donāt want to add this weight to every Hyperapp install. Is there any way we can still distribute typings.d.ts without having TypeScript as a dev dependency on this repo?
What other options do we have?
Issue Analytics
- State:
- Created 6 years ago
- Comments:39 (24 by maintainers)
Top Results From Across the Web
How do you produce a .d.ts "typings" definition file from an ...
Hit the Snooze Button Ā· -d ( --declaration ): generates the *.d.ts files Ā· --declarationDir dist/lib : Output directory for generated declaration files....
Read more >Documentation - Publishing - TypeScript
If your types are generated by your source code, publish the types with your source code. Both TypeScript and JavaScript projects can generate...
Read more >What is a ā.d.tsā file in TypeScript? | by Ohans Emmanuel
There are typically two ways a library author may do this. (1) Bundled Types. In this case, the author of the library has...
Read more >Publishing Typings to DefinitelyTyped | by Max Boguslavskiy
@packages. DTS-gen cannot create proper typings for sub-packages (i.e. @webpack-block/assets). Ā· Re-use other typings if you could. Ā· For global typings, youĀ ...
Read more >Type Declarations
TypeScript names these declaration files with the pattern lib.[something].d.ts . If you navigate into a file with that name, you can know that...
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
@JorgeBucaran Hmm, I got a bit carried away and answered more than this issue. Sorry
Given the typings are to be maintained separately from the javascript (#494) they are so called ambient types like any others in definitetyped etc. As a TS user of the hyperapp lib Iād like them to be easily available and while that means having them in the main npm package Iād still accept them being available via adding
@types/hyperapp
as another dependency, especially as I believe @code will still find them anyway (if names are consistent).@JorgeBucaran technically
npx
comes bundled withnpm
>= 5.2.0, which comes bundled with Node.js >= 8.2.0 š