From 01c58e812e1faae6aacfd2a44ab8de344a3b466e Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sat, 27 May 2017 16:31:11 +0200 Subject: be always very strict (recently added to typescript) --- src/checkable.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') 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 = (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 = (new Error()).stack; }) as any as SchemaErrorConstructor; -- cgit v1.2.3