mirror of
https://github.com/morluto/rea
synced 2026-10-27 06:33:32 -04:00
refactor(javascript): normalize erased expression syntax once
This commit is contained in:
@@ -12,6 +12,7 @@ import { compareUnicodeCodePoints } from "../unicodeCodePointOrder.js";
|
||||
import {
|
||||
semanticStaticPropertyKey,
|
||||
semanticStaticPropertyName,
|
||||
unwrapJavaScriptExpression,
|
||||
} from "./javascriptAstValues.js";
|
||||
import {
|
||||
resolveSemanticBindingState,
|
||||
@@ -178,16 +179,7 @@ const collectDefaults = (
|
||||
(node.operator !== "??" && node.operator !== "||")
|
||||
)
|
||||
return;
|
||||
let source = node.left;
|
||||
while (
|
||||
t.isParenthesizedExpression(source) ||
|
||||
t.isTSAsExpression(source) ||
|
||||
t.isTSTypeAssertion(source) ||
|
||||
t.isTypeCastExpression(source) ||
|
||||
t.isTSSatisfiesExpression(source) ||
|
||||
t.isTSNonNullExpression(source)
|
||||
)
|
||||
source = source.expression;
|
||||
const source = unwrapJavaScriptExpression(node.left).node;
|
||||
const candidate = configurationsByNode.get(source);
|
||||
if (candidate === undefined) return;
|
||||
output.push({
|
||||
|
||||
Reference in New Issue
Block a user