question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there another way to distribute typings.d.ts?

See original GitHub issue

TypeScript 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:closed
  • Created 6 years ago
  • Comments:39 (24 by maintainers)

github_iconTop GitHub Comments

6reactions
SteveALeecommented, Dec 31, 2017

@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).

5reactions
okwolfcommented, Jan 7, 2018

@JorgeBucaran technically npx comes bundled with npm >= 5.2.0, which comes bundled with Node.js >= 8.2.0 šŸ™„

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found