Types
MDNMan exposes a set of TypeScript types that help consumers work with parsed MDN Web Docs content, including document metadata, section structure, and supported language categories.
MDNSection
Section titled “MDNSection”Uniquely describes a section within an MDN document.
nameis the section titlelevelis the heading level (the number of#)positionis the number of sections above this one in the document
type MDNSection = { name: string; level: number; position: number;};MDNHeader
Section titled “MDNHeader”The useful information from each MDN reference document’s markdown header.
titleis the document nameslugis the document path as used by MDNpage-typecurrently unusedbrowser-compatcurrently unused
type MDNHeader = { title: string; slug: string; 'page-type'?: string; 'browser-compat'?: string;};SupportedCategories
Section titled “SupportedCategories”MDNMan’s supported categories of the MDN web docs.
export type SupportedCategories = 'javascript' | 'html' | 'css' | 'glossary';