(code: string, typeNames: Iterable<string>, annotation: string)
| 143 | } |
| 144 | |
| 145 | function annotateTypeScriptTypes(code: string, typeNames: Iterable<string>, annotation: string): string { |
| 146 | let annotated = code; |
| 147 | for (const typeName of typeNames) { |
| 148 | annotated = annotated.replace( |
| 149 | new RegExp(`(^|\\n)(export (?:interface|type|enum) ${escapeRegExp(typeName)}\\b)`, "m"), |
| 150 | `$1${annotation}\n$2` |
| 151 | ); |
| 152 | } |
| 153 | return annotated; |
| 154 | } |
| 155 | |
| 156 | function appendUniqueExportBlocks(output: string[], compiled: string, seenBlocks: Map<string, string>): void { |
| 157 | for (const block of splitExportBlocks(compiled)) { |
no test coverage detected
searching dependent graphs…