Hello people. Why is `.d.ts` ignored?
# help
ö
Hello people. Why is
.d.ts
ignored?
Should I keep it, or else how am I going to reuse the type definitions again lolz
t
Not sure why this is ignored but it's not super common to define things using
.d.ts
Only need that when adding types to a library you don't control
ö
I see. I thought that it would be better than importing it everywhere
t
Yeah I used to do that back when I first started using TS. But as the auto import stuff got better I switched over and now it's standard to explicitly export/import types
ö
I see
Any downside to .d.ts in ur opinio?
t
I think at scale explicit imports/exports work better. But if you prefer the ambient type pattern, there's not really too many downsides. Main one I can think of is really only if you're shipping a library, people expect to import types out of a library
ö
i see