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.

[Feature] re-export self defined `.d.ts` files

See original GitHub issue

Current Behavior

say i’m using a library that has no typings. so i have to make my own .d.ts file:

image

however once i build my project, the reference is gone:

image

Expected behavior

copy over or bundle self defined .d.ts files? I’m sorry I don’t really know the terminology or what people normally do for this stuff as I am quite a newbie at publishing TS libs.

Suggested solution(s)

see above

Additional context

TSDX is the best!

Your environment

n/a

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sw-yxcommented, Dec 4, 2019

we need to make this a new feature.

0reactions
seanemmercommented, Nov 19, 2019

Any updates on this? I was unsuccessful when copying my custom typings to dist/. It appears in 0.11.0 the folder gets cleared out on each build.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reexport all typings inside a typescript .d.ts definition file
You can import and then export within the declaration. The following works: declare module '*.foo' { import {valueA} from '.
Read more >
Documentation - Modules .d.ts
One style of exporting in CommonJS is to export a function. Because a function is also an object, then extra fields can be...
Read more >
Declaration Files | The TypeScript Workshop
Traditionally, declaration files are kept in their own directory called types/ and are then imported by the modules that they are defining. It's...
Read more >
How To Use Namespaces in TypeScript
Add the following code to a new TypeScript file: ... Next, add a User class inside the namespace to represent a User entity...
Read more >
What Are *.d.ts files? How to Use *.d.ts Files in TypeScript?
Your browser can't play this video. Learn more. Switch camera.
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