@visulima/fs
Version:
Human friendly file system utilities for Node.js
20 lines (14 loc) • 1.58 kB
text/typescript
import { q as ReadYamlOptions, Y as YamlReviver, r as YamlReplacer } from './packem_shared/types-Crz-rGlC.cjs';
import { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToStringOptions } from 'yaml';
import 'node:fs';
declare function readYaml<R = Record<string, unknown>>(path: URL | string, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): Promise<R>;
declare function readYaml<R = Record<string, unknown>>(path: URL | string, reviver?: YamlReviver, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): Promise<R>;
declare function readYamlSync<R = Record<string, unknown>>(path: URL | string, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): R;
declare function readYamlSync<R = Record<string, unknown>>(path: URL | string, reviver?: YamlReviver, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): R;
type Options$1 = CreateNodeOptions & DocumentOptions & ParseOptions & SchemaOptions & ToStringOptions;
declare function writeYaml(path: URL | string, data: any, options?: Options$1): Promise<void>;
declare function writeYaml(path: URL | string, data: any, replacer?: YamlReplacer, options?: Options$1 | number | string): Promise<void>;
type Options = CreateNodeOptions & DocumentOptions & ParseOptions & SchemaOptions & ToStringOptions;
declare function writeYamlSync(path: URL | string, data: any, options?: Options): void;
declare function writeYamlSync(path: URL | string, data: any, replacer?: YamlReplacer, options?: Options | number | string): void;
export { YamlReplacer, readYaml, readYamlSync, writeYaml, writeYamlSync };