@@ -8409,7 +8409,7 @@ type CallState struct {
8409
8409
func (c *Checker) resolveCall(node *ast.Node, signatures []*Signature, candidatesOutArray *[]*Signature, checkMode CheckMode, callChainFlags SignatureFlags, headMessage *diagnostics.Message) *Signature {
8410
8410
isTaggedTemplate := node.Kind == ast.KindTaggedTemplateExpression
8411
8411
isDecorator := node.Kind == ast.KindDecorator
8412
- isJsxOpeningOrSelfClosingElement := isJsxOpeningLikeElement (node)
8412
+ isJsxOpeningOrSelfClosingElement := ast.IsJsxOpeningLikeElement (node)
8413
8413
isInstanceof := node.Kind == ast.KindBinaryExpression
8414
8414
reportErrors := !c.isInferencePartiallyBlocked && candidatesOutArray == nil
8415
8415
var s CallState
@@ -8715,7 +8715,7 @@ func (c *Checker) hasCorrectArity(node *ast.Node, args []*ast.Node, signature *S
8715
8715
argCount = c.getDecoratorArgumentCount(node, signature)
8716
8716
case ast.IsBinaryExpression(node):
8717
8717
argCount = 1
8718
- case isJsxOpeningLikeElement (node):
8718
+ case ast.IsJsxOpeningLikeElement (node):
8719
8719
callIsIncomplete = node.Attributes().End() == node.End()
8720
8720
if callIsIncomplete {
8721
8721
return true
@@ -8835,7 +8835,7 @@ func (c *Checker) checkTypeArguments(signature *Signature, typeArgumentNodes []*
8835
8835
}
8836
8836
8837
8837
func (c *Checker) isSignatureApplicable(node *ast.Node, args []*ast.Node, signature *Signature, relation *Relation, checkMode CheckMode, reportErrors bool, inferenceContext *InferenceContext, diagnosticOutput *[]*ast.Diagnostic) bool {
8838
- if isJsxOpeningLikeElement (node) {
8838
+ if ast.IsJsxOpeningLikeElement (node) {
8839
8839
return c.checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation, checkMode, reportErrors, diagnosticOutput)
8840
8840
}
8841
8841
thisType := c.getThisTypeOfSignature(signature)
@@ -8976,7 +8976,7 @@ func (c *Checker) getEffectiveCheckNode(argument *ast.Node) *ast.Node {
8976
8976
}
8977
8977
8978
8978
func (c *Checker) inferTypeArguments(node *ast.Node, signature *Signature, args []*ast.Node, checkMode CheckMode, context *InferenceContext) []*Type {
8979
- if isJsxOpeningLikeElement (node) {
8979
+ if ast.IsJsxOpeningLikeElement (node) {
8980
8980
return c.inferJsxTypeArguments(node, signature, checkMode, context)
8981
8981
}
8982
8982
// If a contextual type is available, infer from that type to the return type of the call expression. For
@@ -26493,7 +26493,7 @@ func (c *Checker) markLinkedReferences(location *ast.Node, hint ReferenceHint, p
26493
26493
c.markExportAssignmentAliasReferenced(location)
26494
26494
return
26495
26495
}
26496
- if isJsxOpeningLikeElement (location) || ast.IsJsxOpeningFragment(location) {
26496
+ if ast.IsJsxOpeningLikeElement (location) || ast.IsJsxOpeningFragment(location) {
26497
26497
c.markJsxAliasReferenced(location)
26498
26498
return
26499
26499
}
@@ -26658,7 +26658,7 @@ func (c *Checker) markJsxAliasReferenced(node *ast.Node /*JsxOpeningLikeElement
26658
26658
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)
26659
26659
jsxFactoryNamespace := c.getJsxNamespace(node)
26660
26660
jsxFactoryLocation := node
26661
- if isJsxOpeningLikeElement (node) {
26661
+ if ast.IsJsxOpeningLikeElement (node) {
26662
26662
jsxFactoryLocation = node.TagName()
26663
26663
}
26664
26664
// allow null as jsxFragmentFactory
@@ -27703,7 +27703,7 @@ func (c *Checker) getContextualTypeForArgumentAtIndex(callTarget *ast.Node, argI
27703
27703
} else {
27704
27704
signature = c.getResolvedSignature(callTarget, nil, CheckModeNormal)
27705
27705
}
27706
- if isJsxOpeningLikeElement (callTarget) && argIndex == 0 {
27706
+ if ast.IsJsxOpeningLikeElement (callTarget) && argIndex == 0 {
27707
27707
return c.getEffectiveFirstArgumentForJsxSignature(signature, callTarget)
27708
27708
}
27709
27709
restIndex := len(signature.parameters) - 1
@@ -27957,7 +27957,7 @@ func (c *Checker) getEffectiveCallArguments(node *ast.Node) []*ast.Node {
27957
27957
case ast.IsBinaryExpression(node):
27958
27958
// Handles instanceof operator
27959
27959
return []*ast.Node{node.AsBinaryExpression().Left}
27960
- case isJsxOpeningLikeElement (node):
27960
+ case ast.IsJsxOpeningLikeElement (node):
27961
27961
if len(node.Attributes().AsJsxAttributes().Properties.Nodes) != 0 || (ast.IsJsxOpeningElement(node) && len(node.Parent.Children().Nodes) != 0) {
27962
27962
return []*ast.Node{node.Attributes()}
27963
27963
}
0 commit comments