( name: string, bucket: ExportBucket, node: ts.Node, checker: ts.TypeChecker, cwd: string )
| 3065 | } |
| 3066 | |
| 3067 | function declarationSignature( |
| 3068 | name: string, |
| 3069 | bucket: ExportBucket, |
| 3070 | node: ts.Node, |
| 3071 | checker: ts.TypeChecker, |
| 3072 | cwd: string |
| 3073 | ): string | null { |
| 3074 | if (ts.isVariableStatement(node)) { |
| 3075 | const declaration = node.declarationList.declarations.find((item) => |
| 3076 | ts.isIdentifier(item.name) && item.name.text === name |
| 3077 | ) |
| 3078 | if (declaration === undefined) return null |
| 3079 | const symbol = checker.getSymbolAtLocation(declaration.name) |
| 3080 | return symbol === undefined ? null : symbolSignature(name, bucket, symbol, declaration.name, checker, cwd) |
| 3081 | } |
| 3082 | const nameNode = ts.isFunctionDeclaration(node) || ts.isClassDeclaration(node) || ts.isInterfaceDeclaration(node) || |
| 3083 | ts.isTypeAliasDeclaration(node) |
| 3084 | ? node.name |
| 3085 | : undefined |
| 3086 | if (nameNode === undefined) return null |
| 3087 | const symbol = checker.getSymbolAtLocation(nameNode) |
| 3088 | return symbol === undefined ? null : symbolSignature(name, bucket, symbol, nameNode, checker, cwd) |
| 3089 | } |
| 3090 | |
| 3091 | function exportSpecifierSignature( |
| 3092 | name: string, |
no test coverage detected