You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(migrations): gracefully proceed if reference cannot be resolved (#61426)
A runtime error can surface when TypeScript internally fails to resolve
a reference that is named similar to an input, but no `.d.ts` is
available for it.
See example error:
microsoft/TypeScript#61473 (comment).
PR Close#61426
Copy file name to clipboardExpand all lines: packages/core/schematics/migrations/signal-migration/src/passes/reference_resolution/identify_ts_references.ts
+25-16Lines changed: 25 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -48,25 +48,34 @@ export function identifyPotentialTypeScriptReference<D extends ClassFieldDescrip
48
48
49
49
lettarget: ts.Symbol|undefined=undefined;
50
50
51
-
// Resolve binding elements to their declaration symbol.
52
-
// Commonly inputs are accessed via object expansion. e.g. `const {input} = this;`.
53
-
if(ts.isBindingElement(node.parent)){
54
-
// Skip binding elements that are using spread.
55
-
if(node.parent.dotDotDotToken!==undefined){
56
-
return;
57
-
}
51
+
try{
52
+
// Resolve binding elements to their declaration symbol.
53
+
// Commonly inputs are accessed via object expansion. e.g. `const {input} = this;`.
0 commit comments