tsdx
tsdx copied to clipboard
[Feature] re-export self defined `.d.ts` files
Current Behavior
say i'm using a library that has no typings. so i have to make my own .d.ts file:

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

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
cc @hedgerh and @aleclarson as i feel you two probably know what i should be doing in this scenario..
I haven't dealt with this, either, but I'm looking into it. Seems like it's pretty easy if it's published to DefinitelyTyped, you can just declare it as a dependency. Also, from what I'm reading, it kind of sounds like Typescript will swoop up any typedefs that are in the root of your project? I'm not sure, though.
This part from the TS publishing doc is interesting, though. I can't tell if it's saying to not include your own non-published typedefs of a dependency?

yeah i couldnt parse it either. :(
i did submit my .d.ts files up to DefinitelyTyped, but am wondering what I'm supposed to do in the meantime. for now, VSCode is showing an error but typescript is still inferring any for this definition that it can't find. i wonder if this is how its supposed to be.
I think you need to copy .d.ts modules into dist/ manually (which is what react-spring does).
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.
we need to make this a new feature.