diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-27 16:31:11 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-27 16:31:11 +0200 |
commit | 01c58e812e1faae6aacfd2a44ab8de344a3b466e (patch) | |
tree | 6b0e11175577cd62edc22f356b54b13d33bdce5e | |
parent | 031ede6fb3b7443afa9feb486469fab4def2cec6 (diff) |
be always very strict (recently added to typescript)
-rw-r--r-- | gulpfile.js | 3 | ||||
-rw-r--r-- | src/checkable.ts | 9 | ||||
-rw-r--r-- | tsconfig.json | 5 |
3 files changed, 8 insertions, 9 deletions
diff --git a/gulpfile.js b/gulpfile.js index 1df9d47ff..d21af0561 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -110,9 +110,8 @@ const tsBaseArgs = { lib: ["ES6", "DOM"], noImplicitReturns: true, noFallthroughCasesInSwitch: true, - strictNullChecks: true, + strict: true, noImplicitAny: true, - alwaysStrict: true, }; diff --git a/src/checkable.ts b/src/checkable.ts index 24eebc713..1b6e371f6 100644 --- a/src/checkable.ts +++ b/src/checkable.ts @@ -67,10 +67,11 @@ export namespace Checkable { props: Prop[]; } - export let SchemaError = (function SchemaError(message: string) { - this.name = 'SchemaError'; - this.message = message; - this.stack = (<any>new Error()).stack; + export let SchemaError = (function SchemaError(this: any, message: string) { + let that: any = this as any; + that.name = 'SchemaError'; + that.message = message; + that.stack = (<any>new Error()).stack; }) as any as SchemaErrorConstructor; diff --git a/tsconfig.json b/tsconfig.json index 67bb4f847..a97c8f2b6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,9 +12,8 @@ ], "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, - "strictNullChecks": true, - "noImplicitAny": true, - "alwaysStrict": true + "strict": true, + "noImplicitAny": true }, "files": [ "decl/chrome/chrome.d.ts", |