mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
docs(front_matter): complete documentation (#4166)
This commit is contained in:
parent
7cb9b2055a
commit
eb214d4d13
@ -7,16 +7,19 @@ import {
|
||||
|
||||
type Format = "yaml" | "toml" | "json" | "unknown";
|
||||
|
||||
/** Return type for {@linkcode Extractor}. */
|
||||
export type Extract<T> = {
|
||||
frontMatter: string;
|
||||
body: string;
|
||||
attrs: T;
|
||||
};
|
||||
|
||||
/** Function return type for {@linkcode createExtractor}. */
|
||||
export type Extractor = <T = Record<string, unknown>>(
|
||||
str: string,
|
||||
) => Extract<T>;
|
||||
|
||||
/** Parser function type used alongside {@linkcode createExtractor}. */
|
||||
export type Parser = <T = Record<string, unknown>>(str: string) => T;
|
||||
|
||||
function _extract<T>(
|
||||
|
Loading…
Reference in New Issue
Block a user