@xmcl/mod-parser
Version:
The utilities to parse Forge/Liteloader/Fabric/Quilt mod metadata.
34 lines • 986 B
TypeScript
/**
* Represent the forge config file
*/
export interface ForgeConfig {
[category: string]: {
comment?: string;
properties: Array<ForgeConfig.Property<any>>;
};
}
export declare class CorruptedForgeConfigError extends Error {
readonly reason: string;
readonly line: string;
name: string;
constructor(reason: string, line: string);
}
export declare namespace ForgeConfig {
type Type = 'I' | 'D' | 'S' | 'B';
interface Property<T = number | boolean | string | number[] | boolean[] | string[]> {
readonly type: Type;
readonly name: string;
readonly comment?: string;
value: T;
}
/**
* Convert a forge config to string
*/
function stringify(config: ForgeConfig): string;
/**
* Parse a forge config string into `Config` object
* @param body The forge config string
*/
function parse(body: string): ForgeConfig;
}
//# sourceMappingURL=forgeConfig.d.ts.map