Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable strictFunctionTypes #49929

Merged
merged 112 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
cd19de3
Fix some easy SFT problems
jakebailey Sep 17, 2022
666fcf8
More SFT work
jakebailey Sep 17, 2022
9e58a39
More fixes
jakebailey Sep 17, 2022
77be346
Fix emitter, checker
jakebailey Sep 17, 2022
7061fdb
Fix some more node problems
jakebailey Sep 17, 2022
82bf75b
Parser tweaks
jakebailey Sep 17, 2022
41c4a62
Resolve TODO
jakebailey Sep 17, 2022
8bc26db
More fixes
jakebailey Sep 17, 2022
f985655
Fix es2015
jakebailey Sep 17, 2022
79740c8
Fix all except visitNodes problems
jakebailey Sep 17, 2022
61fbef4
Cast to fix type guard arrow function problem
jakebailey Sep 17, 2022
1b3bd51
Completely overhaul node visitor stuff, untested
jakebailey Sep 18, 2022
9d3b851
Make non-API tests pass without SFT, found some bugs
jakebailey Sep 18, 2022
8bcad61
Wacky Visitor types
jakebailey Sep 19, 2022
f2e34f1
It compiles
jakebailey Sep 19, 2022
e88bc11
Write some jsdoc, update baselines
jakebailey Sep 19, 2022
c31d0a6
Fix lint
jakebailey Sep 19, 2022
5df975b
Actually fix lint
jakebailey Sep 19, 2022
b114cea
PR feedback
jakebailey Sep 19, 2022
88034eb
Allow non-guards as test parameter
jakebailey Sep 19, 2022
fcda16e
Actually, maybe this does fix Transform
jakebailey Sep 19, 2022
e7cf213
Update baselines
jakebailey Sep 19, 2022
186749e
Merge branch 'main' into enable-strict-function-types
jakebailey Sep 19, 2022
2ed2e92
Update comment
jakebailey Sep 19, 2022
9ae68fd
Resolve a TODO
jakebailey Sep 20, 2022
8b1efc1
Remove already resolved TODO
jakebailey Sep 20, 2022
eff9485
More todo updats
jakebailey Sep 20, 2022
3a5d135
Fix my lint oops
jakebailey Sep 20, 2022
5a609b9
Merge branch 'main' into enable-strict-function-types
jakebailey Sep 20, 2022
59a3189
Much improved NodeVisitor and NodesVisitor
jakebailey Sep 21, 2022
5bf42fa
Resolve some TODOs
jakebailey Sep 21, 2022
00a0f3e
Tweaks
jakebailey Sep 21, 2022
c053b89
Merge branch 'main' into enable-strict-function-types
jakebailey Sep 21, 2022
693b9f0
Remove TVisited for nodesVisitor
jakebailey Sep 22, 2022
0d94fe0
Copy rules to visit functions
jakebailey Sep 22, 2022
9876a57
Fixups
jakebailey Sep 22, 2022
721ed63
Simplify other implementations of NodeVisitor and NodesVisitor, now t…
jakebailey Sep 22, 2022
4329b73
Restore undefined-ness of original Visitor type
jakebailey Sep 22, 2022
45c2ca8
Make fixes more consistent
jakebailey Sep 22, 2022
d1a95df
Lint fix
jakebailey Sep 22, 2022
65ad1d3
Address some TODOs
jakebailey Sep 22, 2022
7a4a2c2
Shift around TODO
jakebailey Sep 22, 2022
52ca3a6
Add a clarifying JSDoc comment to isParameterDeclaration
jakebailey Sep 22, 2022
a0af83b
Cleanups and reverts
jakebailey Sep 22, 2022
bfee29b
Merge branch 'main' into enable-strict-function-types
jakebailey Sep 22, 2022
d263e9b
Move the undefined into the VisitResult
jakebailey Sep 22, 2022
982c706
Resolve a TODO
jakebailey Sep 22, 2022
fce72fe
Change the other VisitResult uses for consistency
jakebailey Sep 22, 2022
cd4aa3c
Cleanups
jakebailey Sep 22, 2022
734c58f
Eliminate isArrayOf
jakebailey Sep 22, 2022
1b7fbeb
Remove cast for byteLength by using BufferEncoding type
jakebailey Sep 22, 2022
a4874b1
Remove checks
jakebailey Sep 22, 2022
d3c8231
Resolve some TODOs
jakebailey Sep 22, 2022
76ca962
Fix lint
jakebailey Sep 22, 2022
8fae2ca
Merge branch 'main' into enable-strict-function-types
jakebailey Sep 24, 2022
8f4f9ee
Merge branch 'main' into enable-strict-function-types
jakebailey Sep 26, 2022
b95dc38
Mark new helper as internal
jakebailey Sep 26, 2022
65cf0f8
Merge branch 'main' into enable-strict-function-types
jakebailey Oct 1, 2022
29da028
Merge branch 'main' into enable-strict-function-types
jakebailey Oct 20, 2022
46a5d91
Duplicate jsdoc
jakebailey Oct 20, 2022
f89c0c4
Accept baselines
jakebailey Oct 20, 2022
9d81f75
Merge branch 'main' into enable-strict-function-types
jakebailey Oct 27, 2022
56f36a5
Fix recent bug found by SFT
jakebailey Oct 27, 2022
5061ebb
Merge branch 'main' into enable-strict-function-types
jakebailey Nov 2, 2022
9e6837d
Merge branch 'main' into enable-strict-function-types
jakebailey Nov 5, 2022
8e8d706
Fix compiler error
jakebailey Nov 5, 2022
9eb2720
Remove unused Parent type param
jakebailey Nov 7, 2022
1ba329e
Merge branch 'main' into enable-strict-function-types
jakebailey Nov 7, 2022
b5b49ce
Merge branch 'main' into enable-strict-function-types
jakebailey Nov 8, 2022
8d17434
Fix merge issues
jakebailey Nov 8, 2022
edba1cc
Merge branch 'main' into enable-strict-function-types
jakebailey Nov 9, 2022
a1c5eca
Fix test
jakebailey Nov 9, 2022
5f595b7
Merge branch 'main' into enable-strict-function-types
jakebailey Nov 9, 2022
1accebd
Fix merge
jakebailey Nov 9, 2022
7d14f62
Merge branch 'main' into enable-strict-function-types
jakebailey Nov 11, 2022
a464d1f
Merge branch 'main' into enable-strict-function-types
jakebailey Nov 15, 2022
096bf30
Fix old merge oops
jakebailey Nov 15, 2022
97cad23
Merge branch 'main' into enable-strict-function-types
jakebailey Nov 16, 2022
a401217
Fix spacing problems caused by merge oops
jakebailey Nov 16, 2022
ba87ccf
Drop some new calls to Debug.type
jakebailey Nov 17, 2022
2f192b9
Remove my leftover comment
jakebailey Nov 17, 2022
a8608d6
Merge branch 'main' into enable-strict-function-types
jakebailey Nov 17, 2022
e0dcfb1
Fix formatting and export oops
jakebailey Nov 17, 2022
e52a85a
More PR fixups
jakebailey Nov 17, 2022
78459ba
Merge branch 'main' into enable-strict-function-types
jakebailey Nov 17, 2022
5b54712
fix missed lint
jakebailey Nov 17, 2022
2bb1554
Fix dts
jakebailey Nov 17, 2022
e14a8a6
Restore old transformer signatures
jakebailey Nov 17, 2022
6e9ef92
Merge branch 'main' into enable-strict-function-types
jakebailey Nov 17, 2022
cd58e0f
Fix post merge
jakebailey Nov 17, 2022
10393c8
Merge branch 'main' into enable-strict-function-types
jakebailey Dec 6, 2022
2a1c1f1
Fix bad merge
jakebailey Dec 6, 2022
75b300e
Merge branch 'main' into enable-strict-function-types
jakebailey Dec 13, 2022
71d3eac
Restore old cast and tryCast
jakebailey Dec 18, 2022
0c38a85
Merge branch 'main' into enable-strict-function-types
jakebailey Dec 18, 2022
828abf2
Fix new error
jakebailey Dec 18, 2022
9ee1691
Merge branch 'main' into enable-strict-function-types
jakebailey Jan 4, 2023
cd92e04
Eagerly test visited nodes during visitArray
jakebailey Jan 5, 2023
e7fa691
Merge branch 'main' into enable-strict-function-types
jakebailey Jan 8, 2023
a6f6ebb
Remove parameters fixed by future LKG
jakebailey Jan 8, 2023
e446399
Remove assertNode params
jakebailey Jan 8, 2023
a0199a3
Attempt to revert some changes in deprecatedcompat
jakebailey Jan 8, 2023
5e01002
Merge branch 'main' into enable-strict-function-types
jakebailey Jan 9, 2023
41cb1fc
For now, just fully specify all every/some in this file
jakebailey Jan 10, 2023
ae4be6b
Fix typo
jakebailey Jan 10, 2023
bfb1417
Merge branch 'main' into enable-strict-function-types
jakebailey Jan 11, 2023
00261cb
Revert some explicit type parameters fixed by inference tweak PRs in …
jakebailey Jan 11, 2023
268670f
Merge branch 'main' into enable-strict-function-types
jakebailey Jan 11, 2023
129a69e
Merge branch 'main' into enable-strict-function-types
jakebailey Jan 13, 2023
837c3d5
Make visitor required in API
jakebailey Jan 13, 2023
4ff34cb
meh, just remove the check, it's easy to re-add if someone crashes
jakebailey Jan 13, 2023
292413f
Merge branch 'main' into enable-strict-function-types
jakebailey Jan 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Much improved NodeVisitor and NodesVisitor
  • Loading branch information
jakebailey committed Sep 21, 2022
commit 59a318956cfabbe6845b300edceaf5c583a4cf95
51 changes: 31 additions & 20 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5503,24 +5503,35 @@ namespace ts {
return setTextRange(factory.cloneNode(visitEachChild(node, deepCloneOrReuseNode, nullTransformationContext, deepCloneOrReuseNodes)), node);
}

andrewbranch marked this conversation as resolved.
Show resolved Hide resolved
function deepCloneOrReuseNodes<
TIn extends Node,
TArray extends NodeArray<TIn> | undefined,
TVisited extends Node | undefined,
TAssert extends NonNullable<TVisited>,
TOutArray extends TArray extends undefined ? NodeArray<TAssert> | undefined
: NodeArray<TAssert>,
>(
nodes: TArray,
/**
* @see {NodesVisitor}
* @see {visitNodes}
*/
function deepCloneOrReuseNodes<TIn extends Node, TInArray extends NodeArray<TIn> | undefined, TVisited extends Node | undefined, TOut extends Node>(
nodes: TInArray,
visitor: Visitor<TIn, TVisited> | undefined,
test: (node: Node) => node is TOut,
start?: number,
count?: number,
): NodeArray<TOut> | (TInArray & undefined);
function deepCloneOrReuseNodes<TIn extends Node, TInArray extends NodeArray<TIn> | undefined, TVisited extends Node | undefined>(
nodes: TInArray,
visitor: Visitor<TIn, TVisited> | undefined,
test?: (node: Node) => boolean,
start?: number,
count?: number,
): NodeArray<Node> | (TInArray & undefined);
function deepCloneOrReuseNodes<TIn extends Node, TInArray extends NodeArray<TIn> | undefined, TVisited extends Node | undefined>(
nodes: TInArray,
visitor: Visitor<TIn, TVisited> | undefined,
test?: ((node: Node) => node is TAssert) | ((node: Node) => boolean),
test?: (node: Node) => boolean,
start?: number,
count?: number,
): TOutArray {
): NodeArray<Node> | undefined {
if (nodes && nodes.length === 0) {
// Ensure we explicitly make a copy of an empty array; visitNodes will not do this unless the array has elements,
// which can lead to us reusing the same empty NodeArray more than once within the same AST during type noding.
return setTextRange(factory.createNodeArray(/*nodes*/ undefined, nodes.hasTrailingComma), nodes) as TOutArray;
return setTextRange(factory.createNodeArray(/*nodes*/ undefined, nodes.hasTrailingComma), nodes);
}
return visitNodes(nodes, visitor, test, start, count);
}
Expand Down Expand Up @@ -6834,16 +6845,16 @@ namespace ts {
return factory.createKeywordTypeNode(SyntaxKind.UnknownKeyword);
}
if (isJSDocNullableType(node)) {
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createLiteralTypeNode(factory.createNull())]);
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]);
}
if (isJSDocOptionalType(node)) {
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols), factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword)]);
return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword)]);
}
if (isJSDocNonNullableType(node)) {
return visitNode(node.type, visitExistingNodeTreeSymbols);
}
if (isJSDocVariadicType(node)) {
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols));
return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode));
}
if (isJSDocTypeLiteral(node)) {
return factory.createTypeLiteralNode(map(node.jsDocPropertyTags, t => {
Expand Down Expand Up @@ -6872,7 +6883,7 @@ namespace ts {
/*questionToken*/ undefined,
visitNode(node.typeArguments![0], visitExistingNodeTreeSymbols, isTypeNode)
)],
visitNode(node.typeArguments![1], visitExistingNodeTreeSymbols)
visitNode(node.typeArguments![1], visitExistingNodeTreeSymbols, isTypeNode)
)]);
}
if (isJSDocFunctionType(node)) {
Expand All @@ -6886,10 +6897,10 @@ namespace ts {
getEffectiveDotDotDotForParameter(p),
getNameForJSDocFunctionParameter(p, i),
p.questionToken,
visitNode(p.type, visitExistingNodeTreeSymbols),
visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
/*initializer*/ undefined
)),
visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)
visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)
);
}
else {
Expand All @@ -6900,10 +6911,10 @@ namespace ts {
getEffectiveDotDotDotForParameter(p),
getNameForJSDocFunctionParameter(p, i),
p.questionToken,
visitNode(p.type, visitExistingNodeTreeSymbols),
visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode),
/*initializer*/ undefined
)),
visitNode(node.type, visitExistingNodeTreeSymbols) || factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)
visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)
);
}
}
Expand Down
54 changes: 27 additions & 27 deletions src/compiler/transformers/classFields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ namespace ts {
}

function createPrivateIdentifierAccess(info: PrivateIdentifierInfo, receiver: Expression): Expression {
return createPrivateIdentifierAccessHelper(info, visitNode(receiver, visitor, isExpression));
return createPrivateIdentifierAccessHelper(info, Debug.checkDefined(visitNode(receiver, visitor, isExpression)));
}

function createPrivateIdentifierAccessHelper(info: PrivateIdentifierInfo, receiver: Expression): Expression {
Expand Down Expand Up @@ -714,7 +714,7 @@ namespace ts {
// converts `super[x]` into `Reflect.get(_baseTemp, x, _classTemp)`
const superProperty = factory.createReflectGetCall(
superClassReference,
visitNode(node.argumentExpression, visitor, isExpression),
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression)),
classConstructor
);
setOriginalNode(superProperty, node.expression);
Expand Down Expand Up @@ -788,7 +788,7 @@ namespace ts {
}
else {
getterName = factory.createTempVariable(hoistVariableDeclaration);
setterName = factory.createAssignment(getterName, visitNode(operand.argumentExpression, visitor, isExpression));
setterName = factory.createAssignment(getterName, Debug.checkDefined(visitNode(operand.argumentExpression, visitor, isExpression)));
}
}
if (setterName && getterName) {
Expand Down Expand Up @@ -825,7 +825,7 @@ namespace ts {
function visitExpressionStatement(node: ExpressionStatement) {
return factory.updateExpressionStatement(
node,
visitNode(node.expression, discardedValueVisitor, isExpression)
Debug.checkDefined(visitNode(node.expression, discardedValueVisitor, isExpression))
);
}

Expand All @@ -849,17 +849,17 @@ namespace ts {
if (isCallChain(node)) {
return factory.updateCallChain(
node,
factory.createPropertyAccessChain(visitNode(target, visitor), node.questionDotToken, "call"),
factory.createPropertyAccessChain(Debug.checkDefined(visitNode(target, visitor, isExpression)), node.questionDotToken, "call"),
/*questionDotToken*/ undefined,
/*typeArguments*/ undefined,
[visitNode(thisArg, visitor, isExpression), ...visitNodes(node.arguments, visitor, isExpression)]
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes(node.arguments, visitor, isExpression)]
);
}
return factory.updateCallExpression(
node,
factory.createPropertyAccessExpression(visitNode(target, visitor), "call"),
factory.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "call"),
/*typeArguments*/ undefined,
[visitNode(thisArg, visitor, isExpression), ...visitNodes(node.arguments, visitor, isExpression)]
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), ...visitNodes(node.arguments, visitor, isExpression)]
);
}

Expand All @@ -872,7 +872,7 @@ namespace ts {

// converts `super.f(...)` into `Reflect.get(_baseTemp, "f", _classTemp).call(_classTemp, ...)`
const invocation = factory.createFunctionCallCall(
visitNode(node.expression, visitor, isExpression),
Debug.checkDefined(visitNode(node.expression, visitor, isExpression)),
currentClassLexicalEnvironment.classConstructor,
visitNodes(node.arguments, visitor, isExpression)
);
Expand All @@ -892,12 +892,12 @@ namespace ts {
return factory.updateTaggedTemplateExpression(
node,
factory.createCallExpression(
factory.createPropertyAccessExpression(visitNode(target, visitor), "bind"),
factory.createPropertyAccessExpression(Debug.checkDefined(visitNode(target, visitor, isExpression)), "bind"),
/*typeArguments*/ undefined,
[visitNode(thisArg, visitor, isExpression)]
[Debug.checkDefined(visitNode(thisArg, visitor, isExpression))]
),
/*typeArguments*/ undefined,
visitNode(node.template, visitor, isTemplateLiteral)
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
);
}
if (shouldTransformSuperInStaticInitializers &&
Expand All @@ -907,7 +907,7 @@ namespace ts {

// converts `` super.f`x` `` into `` Reflect.get(_baseTemp, "f", _classTemp).bind(_classTemp)`x` ``
const invocation = factory.createFunctionBindCall(
visitNode(node.tag, visitor, isExpression),
Debug.checkDefined(visitNode(node.tag, visitor, isExpression)),
currentClassLexicalEnvironment.classConstructor,
[]
);
Expand All @@ -917,7 +917,7 @@ namespace ts {
node,
invocation,
/*typeArguments*/ undefined,
visitNode(node.template, visitor, isTemplateLiteral)
Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral))
);
}
return visitEachChild(node, visitor, context);
Expand Down Expand Up @@ -954,9 +954,9 @@ namespace ts {
pendingExpressions = undefined;
node = factory.updateBinaryExpression(
node,
visitNode(node.left, assignmentTargetVisitor),
Debug.checkDefined(visitNode(node.left, assignmentTargetVisitor, isExpression)),
node.operatorToken,
visitNode(node.right, visitor)
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
);
const expr = some(pendingExpressions) ?
factory.inlineExpressions(compact([...pendingExpressions, node])) :
Expand Down Expand Up @@ -993,7 +993,7 @@ namespace ts {
node,
visitInvalidSuperProperty(node.left),
node.operatorToken,
visitNode(node.right, visitor, isExpression));
Debug.checkDefined(visitNode(node.right, visitor, isExpression)));
}
if (classConstructor && superClassReference) {
let setterName =
Expand Down Expand Up @@ -1066,8 +1066,8 @@ namespace ts {
}

function createPrivateIdentifierAssignment(info: PrivateIdentifierInfo, receiver: Expression, right: Expression, operator: AssignmentOperator): Expression {
receiver = visitNode(receiver, visitor, isExpression);
right = visitNode(right, visitor, isExpression);
receiver = Debug.checkDefined(visitNode(receiver, visitor, isExpression));
right = Debug.checkDefined(visitNode(right, visitor, isExpression));

if (isCompoundAssignment(operator)) {
const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver);
Expand Down Expand Up @@ -1152,7 +1152,7 @@ namespace ts {
node,
factory.createAssignment(
temp,
visitNode(node.expression, visitor, isExpression)
Debug.checkDefined(visitNode(node.expression, visitor, isExpression))
),
/*typeArguments*/ undefined
);
Expand Down Expand Up @@ -1873,7 +1873,7 @@ namespace ts {
factory.updateElementAccessExpression(
node,
factory.createVoidZero(),
visitNode(node.argumentExpression, visitor, isExpression));
Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression)));
}

function onEmitNode(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) {
Expand Down Expand Up @@ -2345,7 +2345,7 @@ namespace ts {
// differently inside the function.
if (isThisProperty(node) || isSuperProperty(node) || !isSimpleCopiableExpression(node.expression)) {
receiver = factory.createTempVariable(hoistVariableDeclaration, /*reservedInNestedScopes*/ true);
getPendingExpressions().push(factory.createBinaryExpression(receiver, SyntaxKind.EqualsToken, visitNode(node.expression, visitor, isExpression)));
getPendingExpressions().push(factory.createBinaryExpression(receiver, SyntaxKind.EqualsToken, Debug.checkDefined(visitNode(node.expression, visitor, isExpression))));
}
return factory.createAssignmentTargetWrapper(
parameter,
Expand Down Expand Up @@ -2398,7 +2398,7 @@ namespace ts {
node,
wrapped,
node.operatorToken,
visitNode(node.right, visitor, isExpression)
Debug.checkDefined(visitNode(node.right, visitor, isExpression))
);
}
else if (isSpreadElement(node)) {
Expand Down Expand Up @@ -2452,16 +2452,16 @@ namespace ts {
const initializer = getInitializerOfBindingOrAssignmentElement(node);
return factory.updatePropertyAssignment(
node,
visitNode(node.name, visitor, isPropertyName),
Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)),
wrapped ?
initializer ? factory.createAssignment(wrapped, visitNode(initializer, visitor)) : wrapped :
visitNode(node.initializer, assignmentTargetVisitor, isExpression)
initializer ? factory.createAssignment(wrapped, Debug.checkDefined(visitNode(initializer, visitor, isExpression))) : wrapped :
Debug.checkDefined(visitNode(node.initializer, assignmentTargetVisitor, isExpression))
);
}
if (isSpreadAssignment(node)) {
return factory.updateSpreadAssignment(
node,
wrapped || visitNode(node.expression, assignmentTargetVisitor, isExpression)
wrapped || Debug.checkDefined(visitNode(node.expression, assignmentTargetVisitor, isExpression))
);
}
Debug.assert(wrapped === undefined, "Should not have generated a wrapped target");
Expand Down
Loading