Closed
Description
TypeScript Version: 2.4.2
Code
import * as ts from 'typescript';
const module = ts.transpileModule('const a: string = 2; a = 0;', {
reportDiagnostics: true,
});
console.log(module.diagnostics);
Expected behavior:
Reports [ts] Type '2' is not assignable to type 'string'
.
Actual behavior:
Diagnostics is an empty array []
.