-
pnpm i
-
pnpm build
- observe errors due to @ts-expect-error where I expect to see errors.
-
pnpm runMjs
(I set noEmitOnError: false, so this will work)- node fails at runtime,
ERR_IMPORT_ASSERTION_TYPE_MISSING
, expected due to how node handles json imports.
- node fails at runtime,
-
pnpm runCjs
- node also fails at runtime,
ERR_IMPORT_ASSERTION_TYPE_MISSING
! This is becauseimport()
is available in commonjs modules in node, and has the same semantics there as the ESM import. So, this runtime error is also expected.
- node also fails at runtime,
Because of the errors in steps 3 and 4, I expect TS to report the errors noted in step 2.