( name: string, bucket: ExportBucket, node: ts.Node, checker: ts.TypeChecker, cwd: string )
| 2995 | } |
| 2996 | |
| 2997 | function declarationSignature( |
| 2998 | name: string, |
| 2999 | bucket: ExportBucket, |
| 3000 | node: ts.Node, |
| 3001 | checker: ts.TypeChecker, |
| 3002 | cwd: string |
| 3003 | ): string | null { |
| 3004 | if (ts.isVariableStatement(node)) { |
| 3005 | const declaration = node.declarationList.declarations.find((item) => |
| 3006 | ts.isIdentifier(item.name) && item.name.text === name |
| 3007 | ) |
| 3008 | if (declaration === undefined) return null |
| 3009 | const symbol = checker.getSymbolAtLocation(declaration.name) |
| 3010 | return symbol === undefined ? null : symbolSignature(name, bucket, symbol, declaration.name, checker, cwd) |
| 3011 | } |
| 3012 | const nameNode = ts.isFunctionDeclaration(node) || ts.isClassDeclaration(node) || ts.isInterfaceDeclaration(node) || |
| 3013 | ts.isTypeAliasDeclaration(node) |
| 3014 | ? node.name |
| 3015 | : undefined |
| 3016 | if (nameNode === undefined) return null |
| 3017 | const symbol = checker.getSymbolAtLocation(nameNode) |
| 3018 | return symbol === undefined ? null : symbolSignature(name, bucket, symbol, nameNode, checker, cwd) |
| 3019 | } |
| 3020 | |
| 3021 | function exportSpecifierSignature( |
| 3022 | name: string, |
no test coverage detected