electron/spec/ts-smoke/runner.js
Samuel Attard 122685194a
build: add import/order eslint rule (#44085)
* build: add import/order eslint rule

* chore: run lint:js --fix
2024-10-02 19:10:44 -07:00

18 lines
602 B
JavaScript

const childProcess = require('node:child_process');
const path = require('node:path');
const typeCheck = () => {
const tscExec = path.resolve(require.resolve('typescript'), '../../bin/tsc');
const tscChild = childProcess.spawn(process.execPath, [tscExec, '--project', './ts-smoke/tsconfig.json'], {
cwd: path.resolve(__dirname, '../')
});
tscChild.stdout.on('data', d => console.log(d.toString()));
tscChild.stderr.on('data', d => console.error(d.toString()));
tscChild.on('exit', (tscStatus) => {
if (tscStatus !== 0) {
process.exit(tscStatus);
}
});
};
typeCheck();