UNPKG

yaml-types

Version:

Useful JavaScript types for YAML

23 lines (22 loc) 787 B
import { Scalar } from 'yaml'; /** * `!function` A YAML representation of JavaScript functions * * Stringified as a block literal string, prefixed with the function name. * * When parsing, a no-op function with matching name and toString() is * returned. It is not possible to construct an actual JavaScript function by * evaluating YAML, and it is unsafe to attempt. */ export declare const functionTag: { identify: (value: unknown) => value is Function; tag: string; resolve(str: string): { (): void; toString(): string; }; options: { defaultType: Scalar.Type; }; stringify(i: Scalar<unknown>, ctx: import("yaml/util").StringifyContext, onComment: (() => void) | undefined, onChompKeep: (() => void) | undefined): string; };