From cc22ea04bb141bd0d11568d0534decea55f47e8a Mon Sep 17 00:00:00 2001 From: Logan Smyth Date: Wed, 11 Oct 2017 23:07:29 -0400 Subject: [PATCH] Add type declaration for t.validate. --- lib/types.js | 1 + scripts/generate-interfaces.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/types.js b/lib/types.js index 92be02f84d..e4003bffb9 100644 --- a/lib/types.js +++ b/lib/types.js @@ -1727,6 +1727,7 @@ declare module "babel-types" { declare function isTSType(node: Object, opts?: ?Object): boolean declare function isNumberLiteral(node: Object, opts?: ?Object): boolean declare function isRegexLiteral(node: Object, opts?: ?Object): boolean + declare function validate(n: BabelNode, key: string, value: mixed): void; declare function clone(n: T): T; declare function cloneDeep(n: T): T; declare function removeProperties(n: T, opts: ?{}): void; diff --git a/scripts/generate-interfaces.js b/scripts/generate-interfaces.js index b8595f70f7..5eeaac1d65 100644 --- a/scripts/generate-interfaces.js +++ b/scripts/generate-interfaces.js @@ -136,6 +136,7 @@ for (let i = 0; i < t.TYPES.length; i++) { } lines.push( + `declare function validate(n: BabelNode, key: string, value: mixed): void;`, `declare function clone(n: T): T;`, `declare function cloneDeep(n: T): T;`, `declare function removeProperties(n: T, opts: ?{}): void;`,