(node: ts.Node, kind: ts.SyntaxKind)
| 40 | } |
| 41 | |
| 42 | function findNode(node: ts.Node, kind: ts.SyntaxKind): ts.Node | null { |
| 43 | if (node.kind === kind) { |
| 44 | return node; |
| 45 | } |
| 46 | |
| 47 | for (const c of node.getChildren()) { |
| 48 | const f = findNode(c, kind); |
| 49 | if (f) { |
| 50 | return f; |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | return null; |
| 55 | } |
| 56 | |
| 57 | export function unwrapArrayItemType(type: ts.Type, typeChecker: ts.TypeChecker): ts.Type | null { |
| 58 | if (type.symbol && type.symbol.name === 'Array') { |
no outgoing calls
no test coverage detected