mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-12 05:31:41 +00:00
15 lines
617 B
TypeScript
15 lines
617 B
TypeScript
/// <reference types="node" />
|
|
import { URL } from 'url';
|
|
/**
|
|
* Parses an .ini file
|
|
* @param file The location of the .ini file
|
|
*/
|
|
export declare function parse(file: string | number | Buffer | URL): Promise<[string | null, SectionBody][]>;
|
|
export declare function parseSync(file: string | number | Buffer | URL): [string | null, SectionBody][];
|
|
export declare type SectionName = string | null;
|
|
export interface SectionBody {
|
|
[key: string]: string;
|
|
}
|
|
export declare type ParseStringResult = Array<[SectionName, SectionBody]>;
|
|
export declare function parseString(data: string): ParseStringResult;
|