(symbol: ts.Symbol, bucket: Bucket)
| 561 | } |
| 562 | |
| 563 | const bucketDeclarations = (symbol: ts.Symbol, bucket: Bucket): ReadonlyArray<ts.Declaration> => { |
| 564 | const declarations = symbol.declarations ?? [] |
| 565 | return declarations.filter((declaration) => { |
| 566 | if (bucket === "type") { |
| 567 | return ts.isInterfaceDeclaration(declaration) || ts.isTypeAliasDeclaration(declaration) || |
| 568 | ts.isClassDeclaration(declaration) || ts.isEnumDeclaration(declaration) || |
| 569 | ts.isModuleDeclaration(declaration) |
| 570 | } |
| 571 | return ts.isFunctionDeclaration(declaration) || ts.isVariableDeclaration(declaration) || |
| 572 | ts.isClassDeclaration(declaration) || ts.isEnumDeclaration(declaration) || |
| 573 | ts.isModuleDeclaration(declaration) || ts.isExportAssignment(declaration) |
| 574 | }) |
| 575 | } |
| 576 | |
| 577 | const symbolBuckets = (symbol: ts.Symbol): ReadonlyArray<Bucket> => { |
| 578 | const output: Array<Bucket> = [] |
no test coverage detected