aboutsummaryrefslogtreecommitdiff
path: root/src/checkable.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-27 16:31:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-27 16:31:11 +0200
commit01c58e812e1faae6aacfd2a44ab8de344a3b466e (patch)
tree6b0e11175577cd62edc22f356b54b13d33bdce5e /src/checkable.ts
parent031ede6fb3b7443afa9feb486469fab4def2cec6 (diff)
be always very strict (recently added to typescript)
Diffstat (limited to 'src/checkable.ts')
-rw-r--r--src/checkable.ts9
1 files changed, 5 insertions, 4 deletions
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;