@@ -7713,7 +7713,7 @@ func (c *Checker) createArrayLiteralType(t *Type) *Type {
77137713
77147714func isSpreadIntoCallOrNew(node *ast.Node) bool {
77157715	parent := ast.WalkUpParenthesizedExpressions(node.Parent)
7716- 	return ast.IsSpreadElement(parent) && isCallOrNewExpression (parent.Parent)
7716+ 	return ast.IsSpreadElement(parent) && ast.IsCallOrNewExpression (parent.Parent)
77177717}
77187718
77197719func (c *Checker) checkQualifiedName(node *ast.Node, checkMode CheckMode) *Type {
@@ -7953,7 +7953,7 @@ func (c *Checker) checkDeprecatedSignature(sig *Signature, node *ast.Node) {
79537953	}
79547954	if sig.declaration != nil && sig.declaration.Flags&ast.NodeFlagsDeprecated != 0 {
79557955		suggestionNode := c.getDeprecatedSuggestionNode(node)
7956- 		name := tryGetPropertyAccessOrIdentifierToString(getInvokedExpression (node))
7956+ 		name := tryGetPropertyAccessOrIdentifierToString(ast.GetInvokedExpression (node))
79577957		c.addDeprecatedSuggestionWithSignature(suggestionNode, sig.declaration, name, c.signatureToString(sig))
79587958	}
79597959}
@@ -8419,7 +8419,7 @@ type CallState struct {
84198419func (c *Checker) resolveCall(node *ast.Node, signatures []*Signature, candidatesOutArray *[]*Signature, checkMode CheckMode, callChainFlags SignatureFlags, headMessage *diagnostics.Message) *Signature {
84208420	isTaggedTemplate := node.Kind == ast.KindTaggedTemplateExpression
84218421	isDecorator := node.Kind == ast.KindDecorator
8422- 	isJsxOpeningOrSelfClosingElement := isJsxOpeningLikeElement (node)
8422+ 	isJsxOpeningOrSelfClosingElement := ast.IsJsxOpeningLikeElement (node)
84238423	isInstanceof := node.Kind == ast.KindBinaryExpression
84248424	reportErrors := !c.isInferencePartiallyBlocked && candidatesOutArray == nil
84258425	var s CallState
@@ -8725,7 +8725,7 @@ func (c *Checker) hasCorrectArity(node *ast.Node, args []*ast.Node, signature *S
87258725		argCount = c.getDecoratorArgumentCount(node, signature)
87268726	case ast.IsBinaryExpression(node):
87278727		argCount = 1
8728- 	case isJsxOpeningLikeElement (node):
8728+ 	case ast.IsJsxOpeningLikeElement (node):
87298729		callIsIncomplete = node.Attributes().End() == node.End()
87308730		if callIsIncomplete {
87318731			return true
@@ -8845,7 +8845,7 @@ func (c *Checker) checkTypeArguments(signature *Signature, typeArgumentNodes []*
88458845}
88468846
88478847func (c *Checker) isSignatureApplicable(node *ast.Node, args []*ast.Node, signature *Signature, relation *Relation, checkMode CheckMode, reportErrors bool, inferenceContext *InferenceContext, diagnosticOutput *[]*ast.Diagnostic) bool {
8848- 	if isJsxOpeningLikeElement (node) {
8848+ 	if ast.IsJsxOpeningLikeElement (node) {
88498849		return c.checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation, checkMode, reportErrors, diagnosticOutput)
88508850	}
88518851	thisType := c.getThisTypeOfSignature(signature)
@@ -8986,7 +8986,7 @@ func (c *Checker) getEffectiveCheckNode(argument *ast.Node) *ast.Node {
89868986}
89878987
89888988func (c *Checker) inferTypeArguments(node *ast.Node, signature *Signature, args []*ast.Node, checkMode CheckMode, context *InferenceContext) []*Type {
8989- 	if isJsxOpeningLikeElement (node) {
8989+ 	if ast.IsJsxOpeningLikeElement (node) {
89908990		return c.inferJsxTypeArguments(node, signature, checkMode, context)
89918991	}
89928992	// If a contextual type is available, infer from that type to the return type of the call expression. For
@@ -10835,7 +10835,7 @@ func (c *Checker) isMethodAccessForCall(node *ast.Node) bool {
1083510835	for ast.IsParenthesizedExpression(node.Parent) {
1083610836		node = node.Parent
1083710837	}
10838- 	return isCallOrNewExpression (node.Parent) && node.Parent.Expression() == node
10838+ 	return ast.IsCallOrNewExpression (node.Parent) && node.Parent.Expression() == node
1083910839}
1084010840
1084110841// Lookup the private identifier lexically.
@@ -11051,7 +11051,7 @@ func (c *Checker) isUncalledFunctionReference(node *ast.Node, symbol *ast.Symbol
1105111051			parent = node.Parent
1105211052		}
1105311053		if ast.IsCallLikeExpression(parent) {
11054- 			return isCallOrNewExpression (parent) && ast.IsIdentifier(node) && c.hasMatchingArgument(parent, node)
11054+ 			return ast.IsCallOrNewExpression (parent) && ast.IsIdentifier(node) && c.hasMatchingArgument(parent, node)
1105511055		}
1105611056		return core.Every(symbol.Declarations, func(d *ast.Node) bool {
1105711057			return !ast.IsFunctionLike(d) || c.IsDeprecatedDeclaration(d)
@@ -14179,7 +14179,7 @@ func (c *Checker) getTargetOfAliasLikeExpression(expression *ast.Node, dontResol
1417914179}
1418014180
1418114181func (c *Checker) getTargetOfNamespaceExportDeclaration(node *ast.Node, dontResolveAlias bool) *ast.Symbol {
14182- 	if canHaveSymbol (node.Parent) {
14182+ 	if ast.CanHaveSymbol (node.Parent) {
1418314183		resolved := c.resolveExternalModuleSymbol(node.Parent.Symbol(), dontResolveAlias)
1418414184		c.markSymbolOfAliasDeclarationIfTypeOnly(node, nil /*immediateTarget*/, resolved, false /*overwriteEmpty*/, nil, "")
1418514185		return resolved
@@ -26275,18 +26275,6 @@ func (c *Checker) markPropertyAsReferenced(prop *ast.Symbol, nodeForCheckWriteOn
2627526275	c.symbolReferenceLinks.Get(target).referenceKinds |= ast.SymbolFlagsAll
2627626276}
2627726277
26278- func (c *Checker) GetExpandedParameters(signature *Signature /* !!! skipUnionExpanding */) []*ast.Symbol {
26279- 	if signatureHasRestParameter(signature) {
26280- 		restIndex := len(signature.parameters) - 1
26281- 		restSymbol := signature.parameters[restIndex]
26282- 		restType := c.getTypeOfSymbol(restSymbol)
26283- 		if isTupleType(restType) {
26284- 			return c.expandSignatureParametersWithTupleMembers(signature, restType.AsTypeReference(), restIndex, restSymbol)
26285- 		}
26286- 	}
26287- 	return signature.parameters
26288- }
26289- 
2629026278func (c *Checker) expandSignatureParametersWithTupleMembers(signature *Signature, restType *TypeReference, restIndex int, restSymbol *ast.Symbol) []*ast.Symbol {
2629126279	elementTypes := c.getTypeArguments(restType.AsType())
2629226280	elementInfos := restType.TargetTupleType().elementInfos
@@ -26765,7 +26753,7 @@ func (c *Checker) markLinkedReferences(location *ast.Node, hint ReferenceHint, p
2676526753			c.markExportAssignmentAliasReferenced(location)
2676626754			return
2676726755		}
26768- 		if isJsxOpeningLikeElement (location) || ast.IsJsxOpeningFragment(location) {
26756+ 		if ast.IsJsxOpeningLikeElement (location) || ast.IsJsxOpeningFragment(location) {
2676926757			c.markJsxAliasReferenced(location)
2677026758			return
2677126759		}
@@ -26930,7 +26918,7 @@ func (c *Checker) markJsxAliasReferenced(node *ast.Node /*JsxOpeningLikeElement
2693026918	jsxFactoryRefErr := core.IfElse(c.compilerOptions.Jsx == core.JsxEmitReact, diagnostics.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found, nil)
2693126919	jsxFactoryNamespace := c.getJsxNamespace(node)
2693226920	jsxFactoryLocation := node
26933- 	if isJsxOpeningLikeElement (node) {
26921+ 	if ast.IsJsxOpeningLikeElement (node) {
2693426922		jsxFactoryLocation = node.TagName()
2693526923	}
2693626924	// allow null as jsxFragmentFactory
@@ -27572,7 +27560,7 @@ func (c *Checker) getContextualType(node *ast.Node, contextFlags ContextFlags) *
2757227560		return c.getContextualType(parent.Parent, contextFlags)
2757327561	case ast.KindArrayLiteralExpression:
2757427562		t := c.getApparentTypeOfContextualType(parent, contextFlags)
27575- 		elementIndex := indexOfNode (parent.AsArrayLiteralExpression().Elements.Nodes, node)
27563+ 		elementIndex := ast.IndexOfNode (parent.AsArrayLiteralExpression().Elements.Nodes, node)
2757627564		firstSpreadIndex, lastSpreadIndex := c.getSpreadIndices(parent)
2757727565		return c.getContextualTypeForElementExpression(t, elementIndex, len(parent.AsArrayLiteralExpression().Elements.Nodes), firstSpreadIndex, lastSpreadIndex)
2757827566	case ast.KindConditionalExpression:
@@ -27975,7 +27963,7 @@ func (c *Checker) getContextualTypeForArgumentAtIndex(callTarget *ast.Node, argI
2797527963	} else {
2797627964		signature = c.getResolvedSignature(callTarget, nil, CheckModeNormal)
2797727965	}
27978- 	if isJsxOpeningLikeElement (callTarget) && argIndex == 0 {
27966+ 	if ast.IsJsxOpeningLikeElement (callTarget) && argIndex == 0 {
2797927967		return c.getEffectiveFirstArgumentForJsxSignature(signature, callTarget)
2798027968	}
2798127969	restIndex := len(signature.parameters) - 1
@@ -28229,7 +28217,7 @@ func (c *Checker) getEffectiveCallArguments(node *ast.Node) []*ast.Node {
2822928217	case ast.IsBinaryExpression(node):
2823028218		// Handles instanceof operator
2823128219		return []*ast.Node{node.AsBinaryExpression().Left}
28232- 	case isJsxOpeningLikeElement (node):
28220+ 	case ast.IsJsxOpeningLikeElement (node):
2823328221		if len(node.Attributes().AsJsxAttributes().Properties.Nodes) != 0 || (ast.IsJsxOpeningElement(node) && len(node.Parent.Children().Nodes) != 0) {
2823428222			return []*ast.Node{node.Attributes()}
2823528223		}
0 commit comments