mirror of
https://github.com/hanzoai/ts-node.git
synced 2026-10-30 19:36:25 +00:00
* increase formatting print-width to 120; 80 hurts legibility of TS too much * apply formatting * fix
15 lines
500 B
TypeScript
15 lines
500 B
TypeScript
import { fork } from 'child_process';
|
|
|
|
// Type syntax to prove its compiled, though the import above should also
|
|
// prove the same
|
|
const a = null as any;
|
|
|
|
console.log(JSON.stringify({ execArgv: process.execArgv, argv: process.argv }));
|
|
if (process.env.generation !== 'grandchild') {
|
|
const nextGeneration = process.env.generation === 'child' ? 'grandchild' : 'child';
|
|
fork(__filename, process.argv.slice(2), {
|
|
env: { ...process.env, generation: nextGeneration },
|
|
stdio: 'inherit',
|
|
});
|
|
}
|