use typescript ES2015 for Promise support
parent
f7bfc49a55
commit
a954845be2
|
@ -21,7 +21,7 @@ declare namespace ajv {
|
|||
dataPath?: string,
|
||||
parentData?: Object | Array<any>,
|
||||
parentDataProperty?: string | number
|
||||
): boolean | Promise;
|
||||
): boolean | Promise<boolean>;
|
||||
errors?: Array<ErrorObject>;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ declare namespace ajv {
|
|||
dataPath?: string,
|
||||
parentData?: Object | Array<any>,
|
||||
parentDataProperty?: string | number
|
||||
): boolean | Promise;
|
||||
): boolean | Promise<boolean>;
|
||||
errors?: Array<ErrorObject>;
|
||||
}
|
||||
|
||||
|
@ -93,8 +93,6 @@ declare namespace ajv {
|
|||
dataVar?: string;
|
||||
}
|
||||
|
||||
type Promise = Object;
|
||||
|
||||
interface ErrorObject {
|
||||
keyword: string;
|
||||
dataPath: string;
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue