MCPcopy Create free account
hub / github.com/Effect-TS/effect / renderCompactEntry

Function renderCompactEntry

packages/tools/api-diff/src/MigrationDoc.ts:260–273  ·  view source on GitHub ↗
(
  entry: MigrationEntry,
  annotation: MigrationAnnotation | undefined
)

Source from the content-addressed store, hash-verified

258}
259
260const renderCompactEntry = (
261 entry: MigrationEntry,
262 annotation: MigrationAnnotation | undefined
263): string => {
264 if (annotation !== undefined) {
265 return `- ${codeSpan(displayApiId(entry.id))} -> ${codeSpan(annotation.replacement)}: ${
266 escapeAnnotationText(annotation.note)
267 }`
268 }
269 const target = entry.rename?.headApiId
270 return target === undefined
271 ? `- ${codeSpan(displayApiId(entry.id))}: TODO: needs guidance`
272 : `- ${codeSpan(displayApiId(entry.id))} -> ${codeSpan(displayApiId(stableApiId(target)))}: TODO: needs guidance`
273}
274
275export const extractImportMapSections = (document: string): string => {
276 const start = document.indexOf("## Import Map")

Callers 1

renderMigrationDocumentFunction · 0.85

Calls 4

displayApiIdFunction · 0.85
escapeAnnotationTextFunction · 0.85
stableApiIdFunction · 0.85
codeSpanFunction · 0.70

Tested by

no test coverage detected