UNPKG

@stryke/fs

Version:

A package containing various file system utilities that expand the functionality of NodeJs's built-in `fs` module.

23 lines (22 loc) 945 B
import { DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions } from "yaml"; //#region src/yaml.d.ts type YamlReadOptions = ParseOptions & DocumentOptions & SchemaOptions & ToJSOptions; /** * Reads a YAML file and returns the object the YAML content represents. * * @param path - A path to a file. * @param options - YAML parse options * @returns Object the YAML content of the file represents */ declare function readYamlFileSync<T extends object = any>(path: string, options?: YamlReadOptions): T; /** * Reads a YAML file and returns the object the YAML content represents. * * @param path - A path to a file. * @param options - YAML parse options * @returns Object the YAML content of the file represents */ declare function readYamlFile<T extends object = any>(path: string, options?: YamlReadOptions): Promise<T>; //#endregion export { YamlReadOptions, readYamlFile, readYamlFileSync }; //# sourceMappingURL=yaml.d.mts.map