From b1e2c8fd5cb5dfa46bc440a12eafaf56cd844b1c Mon Sep 17 00:00:00 2001 From: Philipp Tanlak Date: Mon, 24 Nov 2025 20:54:57 +0100 Subject: Docs --- node_modules/yaml/dist/nodes/Node.d.ts | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 node_modules/yaml/dist/nodes/Node.d.ts (limited to 'node_modules/yaml/dist/nodes/Node.d.ts') diff --git a/node_modules/yaml/dist/nodes/Node.d.ts b/node_modules/yaml/dist/nodes/Node.d.ts new file mode 100644 index 0000000..fe91ba6 --- /dev/null +++ b/node_modules/yaml/dist/nodes/Node.d.ts @@ -0,0 +1,46 @@ +import type { Document } from '../doc/Document.js'; +import type { ToJSOptions } from '../options.js'; +import { Token } from '../parse/cst.js'; +import type { StringifyContext } from '../stringify/stringify.js'; +import type { Alias } from './Alias.js'; +import { NODE_TYPE } from './identity.js'; +import type { Scalar } from './Scalar.js'; +import type { YAMLMap } from './YAMLMap.js'; +import type { YAMLSeq } from './YAMLSeq.js'; +export type Node = Alias | Scalar | YAMLMap | YAMLSeq; +/** Utility type mapper */ +export type NodeType = T extends string | number | bigint | boolean | null | undefined ? Scalar : T extends Date ? Scalar : T extends Array ? YAMLSeq> : T extends { + [key: string]: any; +} ? YAMLMap, NodeType> : T extends { + [key: number]: any; +} ? YAMLMap, NodeType> : Node; +export type ParsedNode = Alias.Parsed | Scalar.Parsed | YAMLMap.Parsed | YAMLSeq.Parsed; +export type Range = [number, number, number]; +export declare abstract class NodeBase { + readonly [NODE_TYPE]: symbol; + /** A comment on or immediately after this */ + comment?: string | null; + /** A comment before this */ + commentBefore?: string | null; + /** + * The `[start, value-end, node-end]` character offsets for the part of the + * source parsed into this node (undefined if not parsed). The `value-end` + * and `node-end` positions are themselves not included in their respective + * ranges. + */ + range?: Range | null; + /** A blank line before this node and its commentBefore */ + spaceBefore?: boolean; + /** The CST token that was composed into this node. */ + srcToken?: Token; + /** A fully qualified tag, if required */ + tag?: string; + /** A plain JS representation of this node */ + abstract toJSON(): any; + abstract toString(ctx?: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string; + constructor(type: symbol); + /** Create a copy of this node. */ + clone(): NodeBase; + /** A plain JavaScript representation of this node. */ + toJS(doc: Document, { mapAsMap, maxAliasCount, onAnchor, reviver }?: ToJSOptions): any; +} -- cgit v1.2.3