Skip to content

Commit

Permalink
fix(babel-types): correct syntax on ensureBlock type
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessidhia committed Oct 4, 2019
1 parent cf788b9 commit 937a656
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-types/scripts/generators/typescript.js
Expand Up @@ -171,7 +171,7 @@ lines.push(
`export function ensureBlock(node: Extract<Node, { body: BlockStatement | Statement | Expression }>): BlockStatement`,
// too complex?
// eslint-disable-next-line max-len
`export function ensureBlock<K extends keyof Extract<Node, { body: BlockStatement | Statement | Expression }> = 'body'>(node: Extract<Node, { [K]: BlockStatement | Statement | Expression }>, key: K): BlockStatement`,
`export function ensureBlock<K extends keyof Extract<Node, { body: BlockStatement | Statement | Expression }> = 'body'>(node: Extract<Node, Record<K, BlockStatement | Statement | Expression>>, key: K): BlockStatement`,
// gatherSequenceExpressions is not exported
`export function toBindingIdentifierName(name: { toString(): string } | null | undefined): string`,
`export function toBlock(node: Statement | Expression, parent?: Function | null): BlockStatement`,
Expand Down

0 comments on commit 937a656

Please sign in to comment.