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)
| 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. |
| 1129 | func (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 | } |
no test coverage detected