Comparing version 0.7.0 to 0.8.0
@@ -227,11 +227,15 @@ // src/check.ts | ||
return [resolveString(node)]; | ||
if (isTypeOf(node.object, [ | ||
const left = node.type === "TSQualifiedName" ? node.left : node.object; | ||
const right = node.type === "TSQualifiedName" ? node.right : node.property; | ||
const computed = node.type === "TSQualifiedName" ? false : node.computed; | ||
if (isTypeOf(left, [ | ||
"Identifier", | ||
"MemberExpression", | ||
"ThisExpression", | ||
"Super" | ||
"Super", | ||
"TSQualifiedName" | ||
])) { | ||
const keys = resolveIdentifier(node.object); | ||
if (isTypeOf(node.property, ["Identifier", "PrivateName", "Literal"])) { | ||
keys.push(resolveString(node.property, node.computed)); | ||
const keys = resolveIdentifier(left); | ||
if (isTypeOf(right, ["Identifier", "PrivateName", "Literal"])) { | ||
keys.push(resolveString(right, computed)); | ||
} else { | ||
@@ -238,0 +242,0 @@ throw new TypeError("Invalid Identifier"); |
@@ -40,3 +40,3 @@ import * as t from '@babel/types'; | ||
declare function resolveTemplateLiteral(node: t.TemplateLiteral): string; | ||
declare function resolveIdentifier(node: t.Identifier | t.PrivateName | t.MemberExpression | t.ThisExpression | t.Super): string[]; | ||
declare function resolveIdentifier(node: t.Identifier | t.PrivateName | t.MemberExpression | t.ThisExpression | t.Super | t.TSEntityName): string[]; | ||
type ObjectPropertyLike = t.ObjectMethod | t.ObjectProperty | t.TSMethodSignature | t.TSPropertySignature; | ||
@@ -43,0 +43,0 @@ declare function resolveObjectKey(node: ObjectPropertyLike, raw?: false): string | number; |
@@ -227,11 +227,15 @@ // src/check.ts | ||
return [resolveString(node)]; | ||
if (isTypeOf(node.object, [ | ||
const left = node.type === "TSQualifiedName" ? node.left : node.object; | ||
const right = node.type === "TSQualifiedName" ? node.right : node.property; | ||
const computed = node.type === "TSQualifiedName" ? false : node.computed; | ||
if (isTypeOf(left, [ | ||
"Identifier", | ||
"MemberExpression", | ||
"ThisExpression", | ||
"Super" | ||
"Super", | ||
"TSQualifiedName" | ||
])) { | ||
const keys = resolveIdentifier(node.object); | ||
if (isTypeOf(node.property, ["Identifier", "PrivateName", "Literal"])) { | ||
keys.push(resolveString(node.property, node.computed)); | ||
const keys = resolveIdentifier(left); | ||
if (isTypeOf(right, ["Identifier", "PrivateName", "Literal"])) { | ||
keys.push(resolveString(right, computed)); | ||
} else { | ||
@@ -238,0 +242,0 @@ throw new TypeError("Invalid Identifier"); |
{ | ||
"name": "ast-kit", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"packageManager": "pnpm@8.6.0", | ||
@@ -5,0 +5,0 @@ "description": "AST Toolkit.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66801
1890