MCPcopy
hub / github.com/posthtml/posthtml / NodeAPI

Interface NodeAPI

types/posthtml.d.ts:38–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 export type NodeAttributes = Record<string, Maybe<string>>;
37
38 interface NodeAPI {
39 walk: (cb: NodeCallback) => Node;
40 match: <
41 TTag extends StringMatcher,
42 TAttrs extends Maybe<AttrMatcher>,
43 TTagResult extends Maybe<string> = TTag extends string
44 ? TTag
45 : TTag extends void
46 ? Maybe<string>
47 : string,
48 TAttrResult extends Maybe<NodeAttributes> = TAttrs extends void
49 ? Maybe<NodeAttributes>
50 : {
51 [P in keyof TAttrs]: string;
52 } &
53 NodeAttributes
54 >(
55 expression: Expression<TTag, TAttrs>,
56 cb: NodeCallback<TTagResult, TAttrResult>
57 ) => Node<TTagResult, TAttrResult>[];
58 }
59
60 export interface RawNode<
61 TTag extends Maybe<string> = Maybe<string>,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…