confbox
Version:
Compact and high quality YAML, TOML, JSONC and JSON5 parsers
20 lines (18 loc) • 564 B
TypeScript
/**
* Converts a [TOML](https://toml.io/) string into an object.
*
*
* @template T The type of the return value.
* @param text The TOML string to parse.
* @returns The JavaScript value converted from the TOML string.
*/
declare function parseTOML<T = unknown>(text: string): T;
/**
* Converts a JavaScript value to a [TOML](https://toml.io/) string.
*
* @param value
* @param options
* @returns The YAML string converted from the JavaScript value.
*/
declare function stringifyToml<T = unknown>(text: string): T;
export { parseTOML, stringifyToml };