Add type declaration for t.validate.

This commit is contained in:
Logan Smyth 2017-10-11 23:07:29 -04:00
parent ad05c9935e
commit cc22ea04bb
2 changed files with 2 additions and 0 deletions

View File

@ -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<T>(n: T): T;
declare function cloneDeep<T>(n: T): T;
declare function removeProperties<T>(n: T, opts: ?{}): void;

View File

@ -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<T>(n: T): T;`,
`declare function cloneDeep<T>(n: T): T;`,
`declare function removeProperties<T>(n: T, opts: ?{}): void;`,