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

Function getDeclarationsFromType

internal/ls/definition.go:430–440  ·  view source on GitHub ↗
(t *checker.Type)

Source from the content-addressed store, hash-verified

428}
429
430func getDeclarationsFromType(t *checker.Type) []*ast.Node {
431 var result []*ast.Node
432 for _, t := range t.Distributed() {
433 if t.Symbol() != nil {
434 for _, decl := range t.Symbol().Declarations {
435 result = core.AppendIfUnique(result, decl)
436 }
437 }
438 }
439 return result
440}

Callers 1

ProvideTypeDefinitionMethod · 0.85

Calls 3

AppendIfUniqueFunction · 0.92
DistributedMethod · 0.80
SymbolMethod · 0.65

Tested by

no test coverage detected