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