From ec621fa269eb17f90b301a0571cc376cc3676fa5 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Thu, 2 Apr 2015 09:55:17 -0700 Subject: [PATCH] Updated API Breaking Changes (markdown) --- API-Breaking-Changes.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/API-Breaking-Changes.md b/API-Breaking-Changes.md index 8d6278d..18577aa 100644 --- a/API-Breaking-Changes.md +++ b/API-Breaking-Changes.md @@ -1,5 +1,15 @@ # TypeScript 1.5 +### Program interface changes +- `TypeChecker.emitFiles` is no longer available; use `Program.emit` instead. +- Getting diagnostics are now all centralized on Program, + - for Syntactic diagnostics for a single file use: `Program.getSyntacticDiagnostics(sourceFile)` + - for Syntactic diagnostics for all files use: `Program.getSyntacticDiagnostics()` + - for Semantic diagnostics for a single file use: `Program.getSemanticDiagnostics(sourceFile)` + - for Semantic diagnostics for all files use: `Program.getSemanticDiagnostics()` + - for compiler options and global diagnostics use: `Program.getGlobalDiagnostics()` +> Tip: use ts.getPreEmitDiagnostics(program) to get syntactic, semantic, and global diagnostics for all files + ### All usages of 'filename' and 'Filename' changed to 'fileName' and 'FileName' Here are the details: - `CompilerHost.getDefaultLibFilename` => `CompilerHost.getDefaultLibFileName`