yini-parser
Version:
Readable configuration without YAML foot-guns or JSON noise. The official Node.js parser for YINI config format — An INI-inspired configuration format with clear nesting, explicit types, and predictable parsing.
22 lines (21 loc) • 1.14 kB
TypeScript
import { ParsedObject, ParseOptions, PreferredFailLevel } from '../types';
/**
* Private class representing a runtime context for a single parse call.
*
* @note This design prevents race conditions: each call gets its own
* runtimeInfo and related state. Without this, multiple calls
* (especially in parallel) could overwrite each other's data.
*
* @note The following options MUST be respected!
* quiet?: boolean // Reduce output (show only errors, does not effect warnings and etc. in meta data).
* silent?: boolean // Suppress all output (even errors, exit code only).
*/
export declare class YiniRuntime {
#private;
constructor(sourceType: 'Inline' | 'File');
private makeRuntimeInfo;
runParse(yiniContent: string, strictMode?: boolean, failLevel?: PreferredFailLevel, includeMetadata?: boolean): ParsedObject;
runParse(yiniContent: string, options?: ParseOptions): ParsedObject;
doParseFile(filePath: string, strictMode?: boolean, failLevel?: PreferredFailLevel, includeMetadata?: boolean): ParsedObject;
doParseFile(filePath: string, options?: ParseOptions): ParsedObject;
}