ts-utls
Version:
Utilities for TypeScript library
16 lines • 426 B
TypeScript
export interface TargetedClass<T> {
new (): T;
}
export interface ConvertJSON {
/**
* @returns an instance of the targeted class type
*/
toClass: <T extends object>(using: TargetedClass<T>) => T;
}
/**
* Base class for converting JSON string to custom type
*
* @param {string} str - The JSON source
*/
export declare const ConvertJSON: (str: string) => ConvertJSON;
//# sourceMappingURL=json.d.ts.map