Skip to main content

render_jsdoc_sections

Function render_jsdoc_sections 

Source
pub fn render_jsdoc_sections(sections: &RustdocSections) -> String
Expand description

Render RustdocSections as a JSDoc comment body (without the /** / */ wrappers — those are added by the caller’s emitter, which knows the indent/escape conventions).

  • # Arguments@param name - desc
  • # Returns@returns desc
  • # Errors@throws desc
  • # Example@example block. Replaces ```rust fences with ```typescript so the example highlights properly in TypeDoc.

Output is a plain string with \n separators; emitters wrap each line in * themselves.