From a954845be254c3436deff1a3893997e6e7156f2c Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Wed, 20 Apr 2016 21:01:22 +0100 Subject: [PATCH] use typescript ES2015 for Promise support --- lib/ajv.d.ts | 6 ++---- package.json | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/ajv.d.ts b/lib/ajv.d.ts index d4dbc8b..e2b638f 100644 --- a/lib/ajv.d.ts +++ b/lib/ajv.d.ts @@ -21,7 +21,7 @@ declare namespace ajv { dataPath?: string, parentData?: Object | Array, parentDataProperty?: string | number - ): boolean | Promise; + ): boolean | Promise; errors?: Array; } @@ -84,7 +84,7 @@ declare namespace ajv { dataPath?: string, parentData?: Object | Array, parentDataProperty?: string | number - ): boolean | Promise; + ): boolean | Promise; errors?: Array; } @@ -93,8 +93,6 @@ declare namespace ajv { dataVar?: string; } - type Promise = Object; - interface ErrorObject { keyword: string; dataPath: string; diff --git a/package.json b/package.json index bfc685e..2dd79be 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "test-fast": "AJV_FAST_TEST=true npm run test-spec", "test-debug": "mocha spec/*.spec.js --debug-brk -R spec", "test-cov": "istanbul cover -x '**/spec/**' node_modules/mocha/bin/_mocha -- spec/*.spec.js -R spec", - "test-ts": "tsc lib/ajv.d.ts", + "test-ts": "tsc --target ES2015 lib/ajv.d.ts", "bundle": "./scripts/bundle . Ajv pure_getters", "bundle-regenerator": "./scripts/bundle regenerator", "bundle-nodent": "./scripts/bundle nodent",