#TypeScript gets a stroke after moving an interface
13 messages · Page 1 of 1 (latest)
.ts ≈ .js + .d.ts
if you're writing .ts, you generally shouldn't be writing .d.ts
why is that an issue? if you're using type-only imports they won't be imported either
you could also put your types with your implementations rather than having type-only files
you're still writing .ts, right...?
anyways, files with only export {} in the build aren't typically considered issues since it's not really consequential at all and you wouldn't usually be looking at the build anyways
Your first file is a module
The declare module code augments (adds to) the types of the module
The second file is a .d.ts file without any imports or exports, so this file is global
Declare module in this context overwrites the definitions for that module globally
I'm not sure if there is a practical way to augment module from global space