diff --git a/front_matter/create_extractor.ts b/front_matter/create_extractor.ts index 24f1163540fb..d746f0d21e7e 100644 --- a/front_matter/create_extractor.ts +++ b/front_matter/create_extractor.ts @@ -7,16 +7,19 @@ import { type Format = "yaml" | "toml" | "json" | "unknown"; +/** Return type for {@linkcode Extractor}. */ export type Extract = { frontMatter: string; body: string; attrs: T; }; +/** Function return type for {@linkcode createExtractor}. */ export type Extractor = >( str: string, ) => Extract; +/** Parser function type used alongside {@linkcode createExtractor}. */ export type Parser = >(str: string) => T; function _extract(