( entry: MigrationEntry, annotation: MigrationAnnotation | undefined )
| 242 | ] |
| 243 | |
| 244 | const renderCompactEntry = ( |
| 245 | entry: MigrationEntry, |
| 246 | annotation: MigrationAnnotation | undefined |
| 247 | ): string => { |
| 248 | if (annotation !== undefined) { |
| 249 | return `- ${codeSpan(displayApiId(entry.id))} -> ${codeSpan(annotation.replacement)}: ${ |
| 250 | escapeAnnotationText(annotation.note) |
| 251 | }` |
| 252 | } |
| 253 | const target = entry.rename?.headApiId |
| 254 | return target === undefined |
| 255 | ? `- ${codeSpan(displayApiId(entry.id))}: TODO: needs guidance` |
| 256 | : `- ${codeSpan(displayApiId(entry.id))} -> ${codeSpan(displayApiId(stableApiId(target)))}: TODO: needs guidance` |
| 257 | } |
| 258 | |
| 259 | export const extractImportMapSections = (document: string): string => { |
| 260 | const start = document.indexOf("## Import Map") |
no test coverage detected