Given a TypeScript import statement like:
import icons from '/icons.json' with { type: 'json' };
How do you make sure TypeScript knows the type of icons
at this point?
I’ve tried to create /icons.d.ts
and /icons.json.d.ts
with a export default
typed named constant, but tsc
doesn’t seem to recognize these files.