MCPcopy Create free account
hub / github.com/microsoft/typescript-go / getTypeWithoutSignatures

Method getTypeWithoutSignatures

internal/checker/checker.go:4502–4517  ·  view source on GitHub ↗
(t *Type)

Source from the content-addressed store, hash-verified

4500}
4501
4502func (c *Checker) getTypeWithoutSignatures(t *Type) *Type {
4503 switch {
4504 case t.flags&TypeFlagsObject != 0:
4505 resolved := c.resolveStructuredTypeMembers(t)
4506 if len(resolved.signatures) != 0 {
4507 result := c.newObjectType(ObjectFlagsAnonymous, t.symbol)
4508 result.objectFlags |= ObjectFlagsMembersResolved
4509 result.AsObjectType().members = resolved.members
4510 result.AsObjectType().properties = resolved.properties
4511 return result
4512 }
4513 case t.flags&TypeFlagsIntersection != 0:
4514 return c.getIntersectionType(core.Map(t.AsIntersectionType().types, c.getTypeWithoutSignatures))
4515 }
4516 return t
4517}
4518
4519func (c *Checker) checkKindsOfPropertyMemberOverrides(t *Type, baseType *Type) {
4520 // TypeScript 1.0 spec (April 2014): 8.2.3

Callers 1

Calls 7

newObjectTypeMethod · 0.95
getIntersectionTypeMethod · 0.95
MapFunction · 0.92
lenFunction · 0.85
AsIntersectionTypeMethod · 0.80
AsObjectTypeMethod · 0.65

Tested by

no test coverage detected