Closed jednano closed 4 years ago
How does the result.dts
property get created? Not seeing it in the docs; just trying to understand the pipeline here.
It's not in the docs. I have a closed source plugin that assigns a string to this property, but really anyone should be able to assign type definitions to a CSS file (or any file for that matter).
I can tell you that if you import type Foo from './foo.css'
and there is an adjacent file named ./foo.css.d.ts
that TypeScript picks it up and that's exactly what I need.
Or you could be using CSS Modules and importing the actuall css file as a dependency. Same thing, TypeScript will pick it up.
Closing, since this is non-standard.
If
result.dts
has contents, please output a.d.ts
file adjacent to the CSS file.