import { Document } from 'yaml/dist/doc/Document'; import type { Node, ParsedNode } from 'yaml/dist/nodes/Node'; import type { DocumentOptions, ParseOptions, SchemaOptions } from 'yaml/dist/options'; import { TreeLike } from './tree'; export declare function HasYamlDocument(tree: Tree, filePath: string): boolean; export declare function GetYamlDocument(tree: TreeLike, filePath: string, create?: boolean, options?: ParseOptions & DocumentOptions & SchemaOptions): Contents extends ParsedNode ? Document.Parsed : Document; export interface UpdateYamlDocumentOptions { space?: number; /** * true - create the file if it does not exist */ coerce?: boolean; options?: ParseOptions & DocumentOptions & SchemaOptions; } export declare function UpdateYamlDocument(tree: TreeLike, updater: ((yamlDocument: Contents extends ParsedNode ? Document.Parsed : Document) => void), filePath: string, options?: UpdateYamlDocumentOptions): void; export declare function UpdateYamlDocument(tree: TreeLike, updater: ((yamlDocument: Contents extends ParsedNode ? Document.Parsed : Document) => Promise), filePath: string, options?: UpdateYamlDocumentOptions): Promise;