What a subject's first link is when it names a declaration: a class (a value of it when called, a typecast), or a value of a type.
(decl: Node, link: SubjectLink, context: ResolutionContext)
| 1609 | |
| 1610 | /** What a subject's first link is when it names a declaration: a class (a value of it when called, a typecast), or a value of a type. */ |
| 1611 | function valueOfDeclaration(decl: Node, link: SubjectLink, context: ResolutionContext): { type: Node | null; classRef: boolean } { |
| 1612 | if (CLASS_KINDS.has(decl.kind)) return { type: decl, classRef: !link.called }; |
| 1613 | if (decl.kind === 'type_alias') return { type: classNamed(decl.name, decl.filePath, context), classRef: !link.called }; |
| 1614 | return { type: valueTypeOf(decl, link.indexed, context), classRef: false }; |
| 1615 | } |
| 1616 | |
| 1617 | /** |
| 1618 | * The class a member's value is of: a field's, a variable's or a property's |
no test coverage detected