UNPKG

1.4 kBTypeScriptView Raw
1import type { Document } from '../doc/Document.js';
2import type { Alias } from './Alias.js';
3import type { Node } from './Node.js';
4import type { Pair } from './Pair.js';
5import type { Scalar } from './Scalar.js';
6import type { YAMLMap } from './YAMLMap.js';
7import type { YAMLSeq } from './YAMLSeq.js';
8export declare const ALIAS: unique symbol;
9export declare const DOC: unique symbol;
10export declare const MAP: unique symbol;
11export declare const PAIR: unique symbol;
12export declare const SCALAR: unique symbol;
13export declare const SEQ: unique symbol;
14export declare const NODE_TYPE: unique symbol;
15export declare const isAlias: (node: any) => node is Alias;
16export declare const isDocument: <T extends Node = Node>(node: any) => node is Document<T>;
17export declare const isMap: <K = unknown, V = unknown>(node: any) => node is YAMLMap<K, V>;
18export declare const isPair: <K = unknown, V = unknown>(node: any) => node is Pair<K, V>;
19export declare const isScalar: <T = unknown>(node: any) => node is Scalar<T>;
20export declare const isSeq: <T = unknown>(node: any) => node is YAMLSeq<T>;
21export declare function isCollection<K = unknown, V = unknown>(node: any): node is YAMLMap<K, V> | YAMLSeq<V>;
22export declare function isNode<T = unknown>(node: any): node is Node<T>;
23export declare const hasAnchor: <K = unknown, V = unknown>(node: unknown) => node is Scalar<V> | YAMLMap<K, V> | YAMLSeq<V>;