be always very strict (recently added to typescript)

This commit is contained in:
Florian Dold 2017-05-27 16:31:11 +02:00
parent 031ede6fb3
commit 01c58e812e
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
3 changed files with 8 additions and 9 deletions

View File

@ -110,9 +110,8 @@ const tsBaseArgs = {
lib: ["ES6", "DOM"], lib: ["ES6", "DOM"],
noImplicitReturns: true, noImplicitReturns: true,
noFallthroughCasesInSwitch: true, noFallthroughCasesInSwitch: true,
strictNullChecks: true, strict: true,
noImplicitAny: true, noImplicitAny: true,
alwaysStrict: true,
}; };

View File

@ -67,10 +67,11 @@ export namespace Checkable {
props: Prop[]; props: Prop[];
} }
export let SchemaError = (function SchemaError(message: string) { export let SchemaError = (function SchemaError(this: any, message: string) {
this.name = 'SchemaError'; let that: any = this as any;
this.message = message; that.name = 'SchemaError';
this.stack = (<any>new Error()).stack; that.message = message;
that.stack = (<any>new Error()).stack;
}) as any as SchemaErrorConstructor; }) as any as SchemaErrorConstructor;

View File

@ -12,9 +12,8 @@
], ],
"noImplicitReturns": true, "noImplicitReturns": true,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"strictNullChecks": true, "strict": true,
"noImplicitAny": true, "noImplicitAny": true
"alwaysStrict": true
}, },
"files": [ "files": [
"decl/chrome/chrome.d.ts", "decl/chrome/chrome.d.ts",