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

Method IsLibTypeForHoverVerbosity

internal/checker/services.go:1129–1140  ·  view source on GitHub ↗

IsLibTypeForHoverVerbosity returns true if a type is declared in a lib file. Don't expand types like Array or Promise, instead treating them as opaque.

(t *Type)

Source from the content-addressed store, hash-verified

1127// IsLibTypeForHoverVerbosity returns true if a type is declared in a lib file.
1128// Don't expand types like Array or Promise, instead treating them as opaque.
1129func (c *Checker) IsLibTypeForHoverVerbosity(t *Type) bool {
1130 var symbol *ast.Symbol
1131 if t.objectFlags&ObjectFlagsReference != 0 {
1132 symbol = t.Target().Symbol()
1133 } else {
1134 symbol = t.Symbol()
1135 }
1136 if c.IsLibSymbolForHoverVerbosity(symbol) {
1137 return true
1138 }
1139 return isTupleType(t)
1140}

Callers 2

isExpandableTypeMethod · 0.80

Calls 4

isTupleTypeFunction · 0.70
SymbolMethod · 0.65
TargetMethod · 0.45

Tested by

no test coverage detected