mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-02 08:35:07 +08:00
* feat(compiler): lower Date.parse through native parser * feat(compiler): support exit status writes and URL getters * chore(compat): regenerate static support after upstream changes * test: update URL fence hint snapshot * test: record new corpus entries for TS7 parity * test: record upstream lstat parity entry
13 lines
337 B
TypeScript
13 lines
337 B
TypeScript
// A non-integer assignment throws catchably and leaves the exit code alone.
|
|
try {
|
|
process.exitCode = 1.5;
|
|
} catch (error) {
|
|
if (error instanceof RangeError) console.log(error.message);
|
|
}
|
|
try {
|
|
process.exitCode = 2 ** 53;
|
|
} catch (error) {
|
|
if (error instanceof RangeError) console.log(error.message);
|
|
}
|
|
console.log("continued");
|