@jkcfg/std
Version:
jk standard library
29 lines (28 loc) • 641 B
TypeScript
/**
* @module std
*/
export declare const stdout: unique symbol;
export declare enum Format {
FromExtension = 0,
JSON = 1,
YAML = 2,
Raw = 3,
YAMLStream = 4,
JSONStream = 5,
HCL = 6
}
export declare enum Overwrite {
Skip = 0,
Write = 1,
Err = 2
}
export interface WriteOptions {
format?: Format;
indent?: number;
overwrite?: Overwrite | boolean;
module?: string;
}
declare type WritePath = string | typeof stdout;
export declare function write(value: any, path?: WritePath, opts?: WriteOptions): void;
export declare function print(value: any, opts?: WriteOptions): void;
export {};