UNPKG

lean4-code-actions

Version:

Refactorings and snippets for Lean 4

10 lines (8 loc) 387 B
import { readFileAsString } from '../filesystem' import { parse } from 'yaml' import { OpenMode, PathLike } from 'fs' import { FileHandle } from 'fs/promises' export async function readFileAsYaml(path: PathLike | FileHandle, options?: { encoding?: null | undefined, flag?: OpenMode | undefined } | null) { const string = await readFileAsString(path, options) return parse(string) }