You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
Urigo
changed the title
Importing json on "module": "NodeNext" with assert { type: 'json' }
Importing json on "module": "NodeNext" with assert { type: 'json' }May 11, 2022
Afraid I don't know, that feature shipped after I left the TypeScript team and I don't know the rules around it off the top of my head - I would have assumed that nodenext would allow it (assuming a modern target also)
I want to import json file and use NodeNext module configurations:
For Node users using my lib I need to add
assert { type: 'json' }
But when I use
"module": "NodeNext"
, an import like that:import isracardCardsTransactionsList from '../schemas/isracardCardsTransactionsList.json' assert { type: 'json' };
I get an error:
error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
When I go back to
"module": "ESNext"
it works.What do you think would be the right configurations?
P.S. this is the repo: https://github.com/Urigo/israeli-bank-scrapers-modern-schemas
The text was updated successfully, but these errors were encountered: