XuqmGroup-H5SDK/node_modules/confbox/dist/ini.d.mts
徐勤民 e34fa2052a feat(private): add private deployment SDK module
Adds @xuqm/h5-sdk/private entry point with JSON-based initialization,
feature gating, and error codes for private deployment scenarios.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 21:08:08 +08:00

62 行
1.6 KiB
TypeScript

//#region src/ini.d.ts
/**
* Converts an [INI](https://www.ini.org/ini-en.html) string into an object.
*
* **Note:** Style and indentation are not preserved currently.
*/
declare function parseINI<T = unknown>(text: string, options?: INIParseOptions): T;
/**
* Converts a JavaScript value to an [INI](https://www.ini.org/ini-en.html) string.
*
* **Note:** Style and indentation are not preserved currently.
*/
declare function stringifyINI(value: any, options?: INIStringifyOptions): string;
interface INIParseOptions {
/**
* Whether to append `[]` to array keys.
*
* Some parsers treat duplicate names by themselves as arrays.
*/
bracketedArray?: boolean;
}
interface INIStringifyOptions {
/**
* Whether to insert spaces before & after `=` character.
* Enabled by default.
*/
whitespace?: boolean;
/**
* Whether to align the `=` character for each section.
*/
align?: boolean;
/**
* Identifier to use for global items
* and to prepend to all other sections.
*/
section?: string;
/**
* Whether to sort all sections & their keys alphabetically.
*/
sort?: boolean;
/**
* Whether to insert a newline after each section header.
*/
newline?: boolean;
/**
* Which platforms line-endings should be used.
*
* win32 -> CR+LF
* other -> LF
*
* Default is the current platform
*/
platform?: string;
/**
* Whether to append `[]` to array keys.
*
* Some parsers treat duplicate names by themselves as arrays
*/
bracketedArray?: boolean;
}
//#endregion
export { INIParseOptions, INIStringifyOptions, parseINI, stringifyINI };