mirror of
https://github.com/morluto/rea.git
synced 2026-10-27 18:05:45 +00:00
refactor(javascript): normalize erased expression syntax once
This commit is contained in:
1 parent
cfb12e47dc
commit
b628bba1fa
17 files changed
+313
-205
No files matched your search
@@ -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