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
When I use "moduleResolution": "node16" in my tsconfig.json, I have to change my code as follows in order for it to compile:
importShortUniqueIdfrom'short-unique-id';// what I want to doconstgenerator=newShortUniqueId(...);// what I have to doconstgenerator=newShortUniqueId.default(...);
Confirm that there is problem on node16 and nodenext.
It ends up with error like
error TS2351: This expression is not constructable.
Type 'typeof import("./node_modules/short-unique-id/dist/short-unique-id")' has no construct signatures.
When I use
"moduleResolution": "node16"
in mytsconfig.json
, I have to change my code as follows in order for it to compile:It seems to be an issue with how the types are declared:
https://arethetypeswrong.github.io/?p=short-unique-id%405.0.3
That site claims that it might not work at runtime - this is something I haven't validated yet.
The text was updated successfully, but these errors were encountered: