UNPKG

noodl-loader

Version:

Loader for noodl applications

16 lines (15 loc) 593 B
import type FileSystemHost from '../file-system'; import * as t from '../types'; /** * Loads a file as a yaml string, object literal, or yaml document * @param filepath * @param as */ declare function loadFile<As extends t.As = 'yml'>(filepath: string, as?: As): Promise<t.ParsedAs<As>>; /** * Loads a file as a yaml string, object literal, or yaml document using a custom fileSystem api * @param filepath * @param as */ declare function loadFile<As extends t.As>(fileSystem: FileSystemHost, filepath: string, as?: As): Promise<t.ParsedAs<As>>; export default loadFile;