From 9bd7afb143fff13458a514da29bd7ad8547a4d68 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Fri, 29 Jan 2016 14:39:01 -0800 Subject: [PATCH] Add new error message and strictThis flag --- src/compiler/commandLineParser.ts | 4 ++++ src/compiler/diagnosticMessages.json | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index d5bf95a6405..3eb42292fb1 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -130,6 +130,10 @@ namespace ts { name: "skipDefaultLibCheck", type: "boolean", }, + { + name: "strictThis", + type: "boolean", + }, { name: "out", type: "string", diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index ca5a6d9d415..2043a89c8fd 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1819,6 +1819,10 @@ "category": "Error", "code": 2670 }, + "A function that is called with the 'new' keyword cannot have a 'this' type that is void.": { + "category": "Error", + "code": 2671 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", "code": 4000