diff --git a/packages/babel-types/scripts/generators/typescript.js b/packages/babel-types/scripts/generators/typescript.js index 35696923e1ae..ca6d609bdd9b 100644 --- a/packages/babel-types/scripts/generators/typescript.js +++ b/packages/babel-types/scripts/generators/typescript.js @@ -153,13 +153,14 @@ lines.push( `export function isBlockScoped(node: Node): boolean`, `export function isImmutable(node: Node): boolean`, `export function isLet(node: Node): boolean`, - `export function isNode(node: ?object): boolean`, + `export function isNode(node: object | null | undefined): boolean`, `export function isNodesEquivalent(a: any, b: any): boolean`, - `export function isPlaceholderType(placeholderType: ?string, targetType: string): boolean`, + // eslint-disable-next-line + `export function isPlaceholderType(placeholderType: string | null | undefined, targetType: string): boolean`, `export function isReferenced(node: Node, parent: Node, grandparent?: Node): boolean`, `export function isScope(node: Node, parent: Node): boolean`, `export function isSpecifierDefault(specifier: ModuleSpecifier): boolean`, - `export function isType(nodetype: ?string, targetType: string): boolean`, + `export function isType(nodetype: string | null | undefined, targetType: string): boolean`, `export function isValidES3Identifier(name: string): boolean`, `export function isValidES3Identifier(name: string): boolean`, `export function isValidIdentifier(name: string): boolean`,