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

Function renderCompactEntry

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

Source from the content-addressed store, hash-verified

242]
243
244const 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
259export const extractImportMapSections = (document: string): string => {
260 const start = document.indexOf("## Import Map")

Callers 1

renderMigrationDocumentFunction · 0.85

Calls 4

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

Tested by

no test coverage detected