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.
name
is the section titlelevel
is the heading level (the number of#
)position
is 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.
title
is the document nameslug
is the document path as used by MDNpage-type
currently unusedbrowser-compat
currently unused
type MDNHeader = { title: string; slug: string; 'page-type'?: string; 'browser-compat'?: string;};
SupportedLanguages
Section titled “SupportedLanguages”MDNMan’s supported categories of the MDN web docs.
export type SupportedLanguages = 'javascript' | 'html' | 'css';