specpress
Version:
Export PDF and/or DOCX files from a subset of Markdown, ASN.1 and JSON files
37 lines (36 loc) • 1.69 kB
TypeScript
export declare class InvalidJsonIndentationLevelException extends RangeError {
constructor(message: string);
}
export declare class JsonReadLimits {
maxFileSize: number;
maxTotalSize: number;
totalBytesRead: number;
constructor(maxFileSize?: number, maxTotalSize?: number);
reset(): void;
}
export declare const jsonReadLimits: JsonReadLimits;
export declare function LoadJsonFileToDict(aJsonFile: string | null | undefined): Record<string, unknown>;
export declare function GetAllJsonFilesInFolder(aTopLevelDirectory: string): string[];
export declare function GetJsonFilesByPattern(aRootFolder: string, aPattern: string): string[];
export type CompiledSchema = (data: unknown) => boolean;
export declare function LoadSchema(aJsonFile: string): CompiledSchema;
export declare class SchemaValidationException extends Error {
constructor(message: string);
}
export declare function ValidateSchema(aJsonData: unknown, aCompiledSchema: CompiledSchema | null, aDescriptor: string, abortOnError?: boolean): boolean;
export declare abstract class JsonObject {
abstract toJSON(anEncoder: RAN4JsonEncoder, aLevel: number): void;
}
export declare class RAN4JsonEncoder {
private filePath;
private buffer;
private indent;
private isBufferEmpty;
private static oneLinePerElement;
constructor(aJsonFile: string | null);
write(aStr: string | null, aLevel: number): void;
writeValue(aValue: unknown, aLevel?: number, aSuffix?: string): void;
writeKey(aKey: string, aLevel: number, aPrefix?: string): void;
writeKeyAndValue(aKey: string, aValue: unknown, aLevel: number, aPrefix?: string, aSuffix?: string): void;
flush(): void;
}