Commit e56e36b
committed
lib: fix TypeScript support check in jitless mode
WebAssembly is disabled when Node.js is run with --jitless. The
internal TypeScript stripper relies on WebAssembly, and previously
failed obscurely in this mode.
This commit ensures that assertTypeScript explicitly checks for the
presence of WebAssembly and throws ERR_WEBASSEMBLY_NOT_SUPPORTED
when it is unavailable.
This change also documents the new error code and incorporates a
regression test into test/es-module/test-typescript.mjs.1 parent 1409ac4 commit e56e36b
3 files changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3350 | 3350 | | |
3351 | 3351 | | |
3352 | 3352 | | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
3353 | 3359 | | |
3354 | 3360 | | |
3355 | 3361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1905 | 1905 | | |
1906 | 1906 | | |
1907 | 1907 | | |
| 1908 | + | |
1908 | 1909 | | |
1909 | 1910 | | |
1910 | 1911 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
0 commit comments