Add type declaration for t.validate.
This commit is contained in:
parent
ad05c9935e
commit
cc22ea04bb
@ -1727,6 +1727,7 @@ declare module "babel-types" {
|
|||||||
declare function isTSType(node: Object, opts?: ?Object): boolean
|
declare function isTSType(node: Object, opts?: ?Object): boolean
|
||||||
declare function isNumberLiteral(node: Object, opts?: ?Object): boolean
|
declare function isNumberLiteral(node: Object, opts?: ?Object): boolean
|
||||||
declare function isRegexLiteral(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 clone<T>(n: T): T;
|
||||||
declare function cloneDeep<T>(n: T): T;
|
declare function cloneDeep<T>(n: T): T;
|
||||||
declare function removeProperties<T>(n: T, opts: ?{}): void;
|
declare function removeProperties<T>(n: T, opts: ?{}): void;
|
||||||
|
|||||||
@ -136,6 +136,7 @@ for (let i = 0; i < t.TYPES.length; i++) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
lines.push(
|
lines.push(
|
||||||
|
`declare function validate(n: BabelNode, key: string, value: mixed): void;`,
|
||||||
`declare function clone<T>(n: T): T;`,
|
`declare function clone<T>(n: T): T;`,
|
||||||
`declare function cloneDeep<T>(n: T): T;`,
|
`declare function cloneDeep<T>(n: T): T;`,
|
||||||
`declare function removeProperties<T>(n: T, opts: ?{}): void;`,
|
`declare function removeProperties<T>(n: T, opts: ?{}): void;`,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user