Skip to content

Commit

Permalink
Fix Babel 8
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed May 1, 2022
1 parent d86a2b5 commit 8be7c27
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/babel-types/src/definitions/core.ts
Expand Up @@ -893,7 +893,13 @@ defineType("ObjectProperty", {
visitor: ["key", "value", "decorators"],
aliases: ["UserWhitespacable", "Property", "ObjectMember"],
validate: (function () {
const pattern = assertNodeType("Identifier", "Pattern");
const pattern = assertNodeType(
"Identifier",
"Pattern",
"TSAsExpression",
"TSNonNullExpression",
"TSTypeAssertion",
);
const expression = assertNodeType("Expression");

return function (parent, key, node) {
Expand Down

0 comments on commit 8be7c27

Please sign in to comment.