Skip to content

Interface: MdFrontmatterSourceBuilder<T> ​

Defined in: markdown/src/builders/md-frontmatter-source-builder.ts:11

Fluent builder and passive AST descriptor for Markdown frontmatter sources (md.*).

Satisfies both MarkdownFrontmatterSourceNode<T> directly and AstBuilder<MarkdownFrontmatterSourceNode<T>> so extractAST produces a pure passive MarkdownFrontmatterSourceNode<T> record without methods.

Extends ​

Type Parameters ​

Type ParameterDefault typeDescription
TunknownResolved rule, skill, or frontmatter payload type.

Methods ​

toAST() ​

ts
toAST(): MarkdownFrontmatterSourceNode<T>;

Defined in: markdown/src/builders/md-frontmatter-source-builder.ts:21

Compiles this builder into a pure, JSON-serializable MarkdownFrontmatterSourceNode<T>.

Strips the builder method wrapper while preserving type, id, pathOrGlob, and kind.

Returns ​

MarkdownFrontmatterSourceNode<T>

Frozen passive MarkdownFrontmatterSourceNode<T>.

Overrides ​

AstBuilder.toAST

Properties ​

PropertyModifierTypeDescriptionInherited fromDefined in
__dataType?readonlyBivariantCallback<[data: T], void>Phantom type brand preserving the resolved content type T.MarkdownFrontmatterSourceNode.__dataTypecore/dist/ast/base/base-source-ast-node.d.ts:17
idreadonlystringLogical identifier of the source descriptor.MarkdownFrontmatterSourceNode.idcore/dist/ast/base/base-source-ast-node.d.ts:15
kind?readonly| "global-rules" | "scoped-rule" | "scoped-rules" | "skill" | "skills" | "frontmatter"Optional loader kind discriminant distinguishing rules and skills.MarkdownFrontmatterSourceNode.kindcore/dist/ast/domain/markdown-frontmatter-source-node.d.ts:13
pathOrGlobreadonlystringFile path or glob pattern targeting Markdown documents with YAML frontmatter.MarkdownFrontmatterSourceNode.pathOrGlobcore/dist/ast/domain/markdown-frontmatter-source-node.d.ts:11
typereadonly"markdown:frontmatter"Unique string-literal discriminant of the source node.MarkdownFrontmatterSourceNode.typecore/dist/ast/base/base-source-ast-node.d.ts:13

Released under the MIT License.