Skip to content

Commit

Permalink
Update generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Apr 29, 2022
1 parent dfb5a53 commit d80fb39
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
19 changes: 16 additions & 3 deletions packages/babel-types/src/ast-types/generated/index.ts
Expand Up @@ -703,7 +703,14 @@ export interface WithStatement extends BaseNode {

export interface AssignmentPattern extends BaseNode {
type: "AssignmentPattern";
left: Identifier | ObjectPattern | ArrayPattern | MemberExpression;
left:
| Identifier
| ObjectPattern
| ArrayPattern
| MemberExpression
| TSAsExpression
| TSTypeAssertion
| TSNonNullExpression;
right: Expression;
decorators?: Array<Decorator> | null;
typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null;
Expand Down Expand Up @@ -2346,15 +2353,21 @@ export type PatternLike =
| RestElement
| AssignmentPattern
| ArrayPattern
| ObjectPattern;
| ObjectPattern
| TSAsExpression
| TSTypeAssertion
| TSNonNullExpression;
export type LVal =
| Identifier
| MemberExpression
| RestElement
| AssignmentPattern
| ArrayPattern
| ObjectPattern
| TSParameterProperty;
| TSParameterProperty
| TSAsExpression
| TSTypeAssertion
| TSNonNullExpression;
export type TSEntityName = Identifier | TSQualifiedName;
export type Literal =
| StringLiteral
Expand Down
9 changes: 8 additions & 1 deletion packages/babel-types/src/builders/generated/index.ts
Expand Up @@ -322,7 +322,14 @@ export function withStatement(
return builder.apply("WithStatement", arguments);
}
export function assignmentPattern(
left: t.Identifier | t.ObjectPattern | t.ArrayPattern | t.MemberExpression,
left:
| t.Identifier
| t.ObjectPattern
| t.ArrayPattern
| t.MemberExpression
| t.TSAsExpression
| t.TSTypeAssertion
| t.TSNonNullExpression,
right: t.Expression,
): t.AssignmentPattern {
return builder.apply("AssignmentPattern", arguments);
Expand Down
6 changes: 6 additions & 0 deletions packages/babel-types/src/validators/generated/index.ts
Expand Up @@ -4870,6 +4870,9 @@ export function isPatternLike(
"AssignmentPattern" === nodeType ||
"ArrayPattern" === nodeType ||
"ObjectPattern" === nodeType ||
"TSAsExpression" === nodeType ||
"TSTypeAssertion" === nodeType ||
"TSNonNullExpression" === nodeType ||
(nodeType === "Placeholder" &&
("Pattern" === (node as t.Placeholder).expectedNode ||
"Identifier" === (node as t.Placeholder).expectedNode))
Expand Down Expand Up @@ -4898,6 +4901,9 @@ export function isLVal(
"ArrayPattern" === nodeType ||
"ObjectPattern" === nodeType ||
"TSParameterProperty" === nodeType ||
"TSAsExpression" === nodeType ||
"TSTypeAssertion" === nodeType ||
"TSNonNullExpression" === nodeType ||
(nodeType === "Placeholder" &&
("Pattern" === (node as t.Placeholder).expectedNode ||
"Identifier" === (node as t.Placeholder).expectedNode))
Expand Down

0 comments on commit d80fb39

Please sign in to comment.