Skip to content

Commit f7980aa

Browse files
authored
Merge branch 'main' into fix/1374
2 parents 8847dd7 + a76fd60 commit f7980aa

17 files changed

+177
-151
lines changed

.github/copilot-instructions.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ go test -run='TestLocal/<test name>' ./internal/testrunner # For new "local
2424

2525
Always make sure code is formatted, linted, and tested before sending a pull request.
2626

27+
<critical>
28+
YOU MUST RUN THESE COMMANDS AT THE END OF YOUR SESSION!
29+
IF THESE COMMANDS FAIL, CI WILL FAIL, AND YOUR PR WILL BE REJECTED OUT OF HAND.
30+
FIXING ERRORS FROM THESE COMMANDS IS YOUR HIGHEST PRIORITY.
31+
ENSURE YOU DO THE RIGHT THINGS TO MAKE THEM PASS.
32+
```sh
33+
npx hereby build # Build the project
34+
npx hereby test # Run tests
35+
npx hereby lint # Run linters
36+
npx hereby format # Format the code
37+
```
38+
</critical>
39+
2740
## Compiler Features, Fixes, and Tests
2841

2942
When fixing a bug or implementing a new feature, at least one minimal test case should always be added in advance to verify the fix.

internal/checker/checker.go

Lines changed: 53 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ type InferenceContext struct {
262262
mapper *TypeMapper // Mapper that fixes inferences
263263
nonFixingMapper *TypeMapper // Mapper that doesn't fix inferences
264264
returnMapper *TypeMapper // Type mapper for inferences from return types (if any)
265+
outerReturnMapper *TypeMapper // Type mapper for inferences from return types of outer function (if any)
265266
inferredTypeParameters []*Type // Inferred type parameters for function result
266267
intraExpressionInferenceSites []IntraExpressionInferenceSite
267268
}
@@ -7307,15 +7308,15 @@ func (c *Checker) instantiateTypeWithSingleGenericCallSignature(node *ast.Node,
73077308
if !hasOverlappingInferences(context.inferences, inferences) {
73087309
c.mergeInferences(context.inferences, inferences)
73097310
context.inferredTypeParameters = core.Concatenate(context.inferredTypeParameters, uniqueTypeParameters)
7310-
return c.getOrCreateTypeFromSignature(instantiatedSignature, nil)
7311+
return c.getOrCreateTypeFromSignature(instantiatedSignature)
73117312
}
73127313
}
73137314
}
73147315
// TODO: The signature may reference any outer inference contexts, but we map pop off and then apply new inference contexts,
73157316
// and thus get different inferred types. That this is cached on the *first* such attempt is not currently an issue, since expression
73167317
// types *also* get cached on the first pass. If we ever properly speculate, though, the cached "isolatedSignatureType" signature
73177318
// field absolutely needs to be included in the list of speculative caches.
7318-
return c.getOrCreateTypeFromSignature(c.instantiateSignatureInContextOf(signature, contextualSignature, context, nil), c.getOuterInferenceTypeParameters())
7319+
return c.getOrCreateTypeFromSignature(c.instantiateSignatureInContextOf(signature, contextualSignature, context, nil))
73197320
}
73207321

73217322
func (c *Checker) getOuterInferenceTypeParameters() []*Type {
@@ -9173,7 +9174,7 @@ func (c *Checker) inferTypeArguments(node *ast.Node, signature *Signature, args
91739174
contextualSignature := c.getSingleCallSignature(instantiatedType)
91749175
var inferenceSourceType *Type
91759176
if contextualSignature != nil && len(contextualSignature.typeParameters) != 0 {
9176-
inferenceSourceType = c.getOrCreateTypeFromSignature(c.getSignatureInstantiationWithoutFillingInTypeArguments(contextualSignature, contextualSignature.typeParameters), nil)
9177+
inferenceSourceType = c.getOrCreateTypeFromSignature(c.getSignatureInstantiationWithoutFillingInTypeArguments(contextualSignature, contextualSignature.typeParameters))
91779178
} else {
91789179
inferenceSourceType = instantiatedType
91799180
}
@@ -9184,10 +9185,14 @@ func (c *Checker) inferTypeArguments(node *ast.Node, signature *Signature, args
91849185
// from the return type. We need a separate inference pass here because (a) instantiation of
91859186
// the source type uses the outer context's return mapper (which excludes inferences made from
91869187
// outer arguments), and (b) we don't want any further inferences going into this context.
9188+
// We use `createOuterReturnMapper` to ensure that all occurrences of outer type parameters are
9189+
// replaced with inferences produced from the outer return type or preceding outer arguments.
9190+
// This protects against circular inferences, i.e. avoiding situations where inferences reference
9191+
// type parameters for which the inferences are being made.
91879192
returnContext := c.newInferenceContext(signature.typeParameters, signature, context.flags, nil)
91889193
var outerReturnMapper *TypeMapper
91899194
if outerContext != nil {
9190-
outerReturnMapper = outerContext.returnMapper
9195+
outerReturnMapper = c.createOuterReturnMapper(outerContext)
91919196
}
91929197
returnSourceType := c.instantiateType(contextualType, outerReturnMapper)
91939198
c.inferTypes(returnContext.inferences, returnSourceType, inferenceTargetType, InferencePriorityNone, false)
@@ -16426,6 +16431,10 @@ func (c *Checker) hasNonCircularBaseConstraint(t *Type) bool {
1642616431

1642716432
// This is a worker function. Use getConstraintOfTypeParameter which guards against circular constraints
1642816433
func (c *Checker) getConstraintFromTypeParameter(t *Type) *Type {
16434+
if t.flags&TypeFlagsTypeParameter == 0 {
16435+
return nil
16436+
}
16437+
1642916438
tp := t.AsTypeParameter()
1643016439
if tp.constraint == nil {
1643116440
var constraint *Type
@@ -18545,8 +18554,10 @@ func (c *Checker) getSignatureInstantiation(sig *Signature, typeArguments []*Typ
1854518554
if returnSignature != nil {
1854618555
newReturnSignature := c.cloneSignature(returnSignature)
1854718556
newReturnSignature.typeParameters = inferredTypeParameters
18557+
newReturnType := c.getOrCreateTypeFromSignature(newReturnSignature)
18558+
newReturnType.AsObjectType().mapper = instantiatedSignature.mapper
1854818559
newInstantiatedSignature := c.cloneSignature(instantiatedSignature)
18549-
newInstantiatedSignature.resolvedReturnType = c.getOrCreateTypeFromSignature(newReturnSignature, nil)
18560+
newInstantiatedSignature.resolvedReturnType = newReturnType
1855018561
return newInstantiatedSignature
1855118562
}
1855218563
}
@@ -18611,7 +18622,7 @@ func (c *Checker) getSingleSignature(t *Type, kind SignatureKind, allowMembers b
1861118622
return nil
1861218623
}
1861318624

18614-
func (c *Checker) getOrCreateTypeFromSignature(sig *Signature, outerTypeParameters []*Type) *Type {
18625+
func (c *Checker) getOrCreateTypeFromSignature(sig *Signature) *Type {
1861518626
// There are two ways to declare a construct signature, one is by declaring a class constructor
1861618627
// using the constructor keyword, and the other is declaring a bare construct signature in an
1861718628
// object type literal or interface (using the new keyword). Each way of declaring a constructor
@@ -18623,17 +18634,12 @@ func (c *Checker) getOrCreateTypeFromSignature(sig *Signature, outerTypeParamete
1862318634
}
1862418635
// If declaration is undefined, it is likely to be the signature of the default constructor.
1862518636
isConstructor := kind == ast.KindUnknown || kind == ast.KindConstructor || kind == ast.KindConstructSignature || kind == ast.KindConstructorType
18626-
// The type must have a symbol with a `Function` flag and a declaration in order to be correctly flagged as possibly containing
18627-
// type variables by `couldContainTypeVariables`
18628-
t := c.newObjectType(ObjectFlagsAnonymous|ObjectFlagsSingleSignatureType, c.newSymbol(ast.SymbolFlagsFunction, ast.InternalSymbolNameFunction))
18629-
if sig.declaration != nil && !ast.NodeIsSynthesized(sig.declaration) {
18630-
t.symbol.Declarations = []*ast.Node{sig.declaration}
18631-
t.symbol.ValueDeclaration = sig.declaration
18632-
}
18633-
if outerTypeParameters == nil && sig.declaration != nil {
18634-
outerTypeParameters = c.getOuterTypeParameters(sig.declaration, true /*includeThisTypes*/)
18637+
18638+
var symbol *ast.Symbol
18639+
if sig.declaration != nil {
18640+
symbol = sig.declaration.Symbol()
1863518641
}
18636-
t.AsSingleSignatureType().outerTypeParameters = outerTypeParameters
18642+
t := c.newObjectType(ObjectFlagsAnonymous|ObjectFlagsSingleSignatureType, symbol)
1863718643
if isConstructor {
1863818644
c.setStructuredTypeMembers(t, nil, nil, []*Signature{sig}, nil)
1863918645
} else {
@@ -21290,6 +21296,9 @@ func (c *Checker) getDefaultTypeArgumentType(isInJavaScriptFile bool) *Type {
2129021296
// this gets the instantiated default type of its target. If the type parameter has no default type or
2129121297
// the default is circular, `undefined` is returned.
2129221298
func (c *Checker) getDefaultFromTypeParameter(t *Type) *Type {
21299+
if t.flags&TypeFlagsTypeParameter == 0 {
21300+
return nil
21301+
}
2129321302
defaultType := c.getResolvedTypeParameterDefault(t)
2129421303
if defaultType != c.noConstraintType && defaultType != c.circularConstraintType {
2129521304
return defaultType
@@ -21457,7 +21466,6 @@ func (c *Checker) couldContainTypeVariablesWorker(t *Type) bool {
2145721466
}
2145821467
result := t.flags&TypeFlagsInstantiable != 0 ||
2145921468
t.flags&TypeFlagsObject != 0 && !c.isNonGenericTopLevelType(t) && (objectFlags&ObjectFlagsReference != 0 && (t.AsTypeReference().node != nil || core.Some(c.getTypeArguments(t), c.couldContainTypeVariables)) ||
21460-
objectFlags&ObjectFlagsSingleSignatureType != 0 && len(t.AsSingleSignatureType().outerTypeParameters) != 0 ||
2146121469
objectFlags&ObjectFlagsAnonymous != 0 && t.symbol != nil && t.symbol.Flags&(ast.SymbolFlagsFunction|ast.SymbolFlagsMethod|ast.SymbolFlagsClass|ast.SymbolFlagsTypeLiteral|ast.SymbolFlagsObjectLiteral) != 0 && t.symbol.Declarations != nil ||
2146221470
objectFlags&(ObjectFlagsMapped|ObjectFlagsReverseMapped|ObjectFlagsObjectRestType|ObjectFlagsInstantiationExpressionType) != 0) ||
2146321471
t.flags&TypeFlagsUnionOrIntersection != 0 && t.flags&TypeFlagsEnumLiteral == 0 && !c.isNonGenericTopLevelType(t) && core.Some(t.Types(), c.couldContainTypeVariables)
@@ -21564,9 +21572,8 @@ func (c *Checker) instantiateTypeWorker(t *Type, m *TypeMapper, alias *TypeAlias
2156421572
}
2156521573

2156621574
// Handles instantiation of the following object types:
21567-
// AnonymousType (ObjectFlagsAnonymous)
21575+
// AnonymousType (ObjectFlagsAnonymous|ObjectFlagsSingleSignatureType)
2156821576
// TypeReference with node != nil (ObjectFlagsReference)
21569-
// SingleSignatureType (ObjectFlagsSingleSignatureType)
2157021577
// InstantiationExpressionType (ObjectFlagsInstantiationExpressionType)
2157121578
// MappedType (ObjectFlagsMapped)
2157221579
func (c *Checker) getObjectTypeInstantiation(t *Type, m *TypeMapper, alias *TypeAlias) *Type {
@@ -21590,34 +21597,30 @@ func (c *Checker) getObjectTypeInstantiation(t *Type, m *TypeMapper, alias *Type
2159021597
default:
2159121598
target = t
2159221599
}
21593-
if t.objectFlags&ObjectFlagsSingleSignatureType != 0 {
21594-
typeParameters = t.AsSingleSignatureType().outerTypeParameters
21595-
} else {
21596-
typeParameters = links.outerTypeParameters
21597-
if typeParameters == nil {
21598-
// The first time an anonymous type is instantiated we compute and store a list of the type
21599-
// parameters that are in scope (and therefore potentially referenced). For type literals that
21600-
// aren't the right hand side of a generic type alias declaration we optimize by reducing the
21601-
// set of type parameters to those that are possibly referenced in the literal.
21602-
typeParameters = c.getOuterTypeParameters(declaration, true /*includeThisTypes*/)
21603-
if len(target.alias.TypeArguments()) == 0 {
21604-
if t.objectFlags&(ObjectFlagsReference|ObjectFlagsInstantiationExpressionType) != 0 {
21605-
typeParameters = core.Filter(typeParameters, func(tp *Type) bool {
21606-
return c.isTypeParameterPossiblyReferenced(tp, declaration)
21607-
})
21608-
} else if target.symbol.Flags&(ast.SymbolFlagsMethod|ast.SymbolFlagsTypeLiteral) != 0 {
21609-
typeParameters = core.Filter(typeParameters, func(tp *Type) bool {
21610-
return core.Some(t.symbol.Declarations, func(d *ast.Node) bool {
21611-
return c.isTypeParameterPossiblyReferenced(tp, d)
21612-
})
21600+
typeParameters = links.outerTypeParameters
21601+
if typeParameters == nil {
21602+
// The first time an anonymous type is instantiated we compute and store a list of the type
21603+
// parameters that are in scope (and therefore potentially referenced). For type literals that
21604+
// aren't the right hand side of a generic type alias declaration we optimize by reducing the
21605+
// set of type parameters to those that are possibly referenced in the literal.
21606+
typeParameters = c.getOuterTypeParameters(declaration, true /*includeThisTypes*/)
21607+
if len(target.alias.TypeArguments()) == 0 {
21608+
if t.objectFlags&(ObjectFlagsReference|ObjectFlagsInstantiationExpressionType) != 0 {
21609+
typeParameters = core.Filter(typeParameters, func(tp *Type) bool {
21610+
return c.isTypeParameterPossiblyReferenced(tp, declaration)
21611+
})
21612+
} else if target.symbol.Flags&(ast.SymbolFlagsMethod|ast.SymbolFlagsTypeLiteral) != 0 {
21613+
typeParameters = core.Filter(typeParameters, func(tp *Type) bool {
21614+
return core.Some(t.symbol.Declarations, func(d *ast.Node) bool {
21615+
return c.isTypeParameterPossiblyReferenced(tp, d)
2161321616
})
21614-
}
21615-
}
21616-
if typeParameters == nil {
21617-
typeParameters = []*Type{}
21617+
})
2161821618
}
21619-
links.outerTypeParameters = typeParameters
2162021619
}
21620+
if typeParameters == nil {
21621+
typeParameters = []*Type{}
21622+
}
21623+
links.outerTypeParameters = typeParameters
2162121624
}
2162221625
if len(typeParameters) == 0 {
2162321626
return t
@@ -21642,12 +21645,10 @@ func (c *Checker) getObjectTypeInstantiation(t *Type, m *TypeMapper, alias *Type
2164221645
}
2164321646
result := data.instantiations[key]
2164421647
if result == nil {
21645-
if t.objectFlags&ObjectFlagsSingleSignatureType != 0 {
21646-
result = c.instantiateAnonymousType(t, m, nil /*alias*/)
21647-
data.instantiations[key] = result
21648-
return result
21649-
}
2165021648
newMapper := newTypeMapper(typeParameters, typeArguments)
21649+
if target.objectFlags&ObjectFlagsSingleSignatureType != 0 && m != nil {
21650+
newMapper = c.combineTypeMappers(newMapper, m)
21651+
}
2165121652
switch {
2165221653
case target.objectFlags&ObjectFlagsReference != 0:
2165321654
result = c.createDeferredTypeReference(t.Target(), t.AsTypeReference().node, newMapper, newAlias)
@@ -21743,8 +21744,6 @@ func (c *Checker) instantiateAnonymousType(t *Type, m *TypeMapper, alias *TypeAl
2174321744
freshTypeParameter.AsTypeParameter().mapper = m
2174421745
case t.objectFlags&ObjectFlagsInstantiationExpressionType != 0:
2174521746
result.AsInstantiationExpressionType().node = t.AsInstantiationExpressionType().node
21746-
case t.objectFlags&ObjectFlagsSingleSignatureType != 0:
21747-
result.AsSingleSignatureType().outerTypeParameters = t.AsSingleSignatureType().outerTypeParameters
2174821747
}
2174921748
if alias == nil {
2175021749
alias = c.instantiateTypeAlias(t.alias, m)
@@ -24270,8 +24269,6 @@ func (c *Checker) newObjectType(objectFlags ObjectFlags, symbol *ast.Symbol) *Ty
2427024269
data = &EvolvingArrayType{}
2427124270
case objectFlags&ObjectFlagsInstantiationExpressionType != 0:
2427224271
data = &InstantiationExpressionType{}
24273-
case objectFlags&ObjectFlagsSingleSignatureType != 0:
24274-
data = &SingleSignatureType{}
2427524272
case objectFlags&ObjectFlagsAnonymous != 0:
2427624273
data = &ObjectType{}
2427724274
default:
@@ -28557,7 +28554,7 @@ func (c *Checker) getContextualTypeForArgumentAtIndex(callTarget *ast.Node, argI
2855728554
func (c *Checker) getContextualTypeForDecorator(decorator *ast.Node) *Type {
2855828555
signature := c.getDecoratorCallSignature(decorator)
2855928556
if signature != nil {
28560-
return c.getOrCreateTypeFromSignature(signature, nil)
28557+
return c.getOrCreateTypeFromSignature(signature)
2856128558
}
2856228559
return nil
2856328560
}
@@ -29087,7 +29084,7 @@ func (c *Checker) getESDecoratorCallSignature(decorator *ast.Node) *Signature {
2908729084
// instance, depending on whether the member was `static`.
2908829085
var valueType *Type
2908929086
if ast.IsMethodDeclaration(node) {
29090-
valueType = c.getOrCreateTypeFromSignature(c.getSignatureFromDeclaration(node), nil)
29087+
valueType = c.getOrCreateTypeFromSignature(c.getSignatureFromDeclaration(node))
2909129088
} else {
2909229089
valueType = c.getTypeOfNode(node)
2909329090
}
@@ -29254,7 +29251,7 @@ func (c *Checker) newESDecoratorCallSignature(targetType *Type, contextType *Typ
2925429251
// Creates a synthetic `FunctionType`
2925529252
func (c *Checker) newFunctionType(typeParameters []*Type, thisParameter *ast.Symbol, parameters []*ast.Symbol, returnType *Type) *Type {
2925629253
signature := c.newCallSignature(typeParameters, thisParameter, parameters, returnType)
29257-
return c.getOrCreateTypeFromSignature(signature, nil)
29254+
return c.getOrCreateTypeFromSignature(signature)
2925829255
}
2925929256

2926029257
func (c *Checker) newGetterFunctionType(t *Type) *Type {

internal/checker/inference.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,19 @@ func (c *Checker) getMapperFromContext(n *InferenceContext) *TypeMapper {
13491349
return n.mapper
13501350
}
13511351

1352+
// Return a type mapper that combines the context's return mapper with a mapper that erases any additional type parameters
1353+
// to their inferences at the time of creation.
1354+
func (c *Checker) createOuterReturnMapper(context *InferenceContext) *TypeMapper {
1355+
if context.outerReturnMapper == nil {
1356+
mapper := c.cloneInferenceContext(context, InferenceFlagsNone).mapper
1357+
if context.returnMapper != nil {
1358+
mapper = newMergedTypeMapper(context.returnMapper, mapper)
1359+
}
1360+
context.outerReturnMapper = mapper
1361+
}
1362+
return context.outerReturnMapper
1363+
}
1364+
13521365
func (c *Checker) getCovariantInference(inference *InferenceInfo, signature *Signature) *Type {
13531366
// Extract all object and array literal types and replace them with a single widened and normalized type.
13541367
candidates := c.unionObjectAndArrayLiteralCandidates(inference.candidates)

internal/checker/jsx.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ func (c *Checker) getStaticTypeOfReferencedJsxConstructor(context *ast.Node) *Ty
11071107
if isJsxIntrinsicTagName(context.TagName()) {
11081108
result := c.getIntrinsicAttributesTypeFromJsxOpeningLikeElement(context)
11091109
fakeSignature := c.createSignatureForJSXIntrinsic(context, result)
1110-
return c.getOrCreateTypeFromSignature(fakeSignature, nil)
1110+
return c.getOrCreateTypeFromSignature(fakeSignature)
11111111
}
11121112
tagType := c.checkExpressionCached(context.TagName())
11131113
if tagType.flags&TypeFlagsStringLiteral != 0 {
@@ -1116,7 +1116,7 @@ func (c *Checker) getStaticTypeOfReferencedJsxConstructor(context *ast.Node) *Ty
11161116
return c.errorType
11171117
}
11181118
fakeSignature := c.createSignatureForJSXIntrinsic(context, result)
1119-
return c.getOrCreateTypeFromSignature(fakeSignature, nil)
1119+
return c.getOrCreateTypeFromSignature(fakeSignature)
11201120
}
11211121
return tagType
11221122
}

internal/checker/nodebuilderimpl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2403,7 +2403,7 @@ func (b *nodeBuilderImpl) createTypeNodeFromObjectType(t *Type) *ast.TypeNode {
24032403
})
24042404
if len(abstractSignatures) > 0 {
24052405
types := core.Map(abstractSignatures, func(s *Signature) *Type {
2406-
return b.ch.getOrCreateTypeFromSignature(s, nil)
2406+
return b.ch.getOrCreateTypeFromSignature(s)
24072407
})
24082408
// count the number of type elements excluding abstract constructors
24092409
typeElementCount := len(callSigs) + (len(ctorSigs) - len(abstractSignatures)) + len(resolved.indexInfos) + (core.IfElse(b.ctx.flags&nodebuilder.FlagsWriteClassExpressionAsTypeLiteral != 0, core.CountWhere(resolved.properties, func(p *ast.Symbol) bool {

internal/checker/types.go

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -574,11 +574,10 @@ func (t *Type) ObjectFlags() ObjectFlags {
574574

575575
// Casts for concrete struct types
576576

577-
func (t *Type) AsIntrinsicType() *IntrinsicType { return t.data.(*IntrinsicType) }
578-
func (t *Type) AsLiteralType() *LiteralType { return t.data.(*LiteralType) }
579-
func (t *Type) AsUniqueESSymbolType() *UniqueESSymbolType { return t.data.(*UniqueESSymbolType) }
580-
func (t *Type) AsTupleType() *TupleType { return t.data.(*TupleType) }
581-
func (t *Type) AsSingleSignatureType() *SingleSignatureType { return t.data.(*SingleSignatureType) }
577+
func (t *Type) AsIntrinsicType() *IntrinsicType { return t.data.(*IntrinsicType) }
578+
func (t *Type) AsLiteralType() *LiteralType { return t.data.(*LiteralType) }
579+
func (t *Type) AsUniqueESSymbolType() *UniqueESSymbolType { return t.data.(*UniqueESSymbolType) }
580+
func (t *Type) AsTupleType() *TupleType { return t.data.(*TupleType) }
582581
func (t *Type) AsInstantiationExpressionType() *InstantiationExpressionType {
583582
return t.data.(*InstantiationExpressionType)
584583
}
@@ -838,10 +837,6 @@ func (t *StructuredType) Properties() []*ast.Symbol {
838837
// ObjectFlagsAnonymous|ObjectFlagsInstantiationExpression: Originating instantiation expression type
839838
// ObjectFlagsAnonymous|ObjectFlagsInstantiated|ObjectFlagsInstantiationExpression: Instantiated instantiation expression type
840839

841-
// SingleSignatureType:
842-
// ObjectFlagsAnonymous|ObjectFlagsSingleSignatureType: Originating single signature type
843-
// ObjectFlagsAnonymous|ObjectFlagsInstantiated|ObjectFlagsSingleSignatureType: Instantiated single signature type
844-
845840
// ReverseMappedType:
846841
// ObjectFlagsAnonymous|ObjectFlagsReverseMapped: Reverse mapped type
847842

@@ -948,13 +943,6 @@ func (t *TupleType) ElementFlags() []ElementFlags {
948943
return elementFlags
949944
}
950945

951-
// SingleSignatureType
952-
953-
type SingleSignatureType struct {
954-
ObjectType
955-
outerTypeParameters []*Type
956-
}
957-
958946
// InstantiationExpressionType
959947

960948
type InstantiationExpressionType struct {

0 commit comments

Comments
 (0)