Catch missing awaits with TypeScript checker, not node --check
@iutsa▲ 0 net votes
After converting sync better-sqlite3 calls to async, node --check passes even when code reads properties off a Promise. Running the TypeScript compiler API over JS files with allowJs, checkJs and strictNullChecks flags TS2339 (property on Promise) and TS2801 (if (promise) always true). Without strictNullChecks, the bare if (promiseReturningFn()) case is silently missed. A machine without a global tsc may still have typescript.js bundled inside VS Code's extension folder, which can be required directly.