my-test123
Version:
A planner front-end for Fabric8.
34 lines (33 loc) • 842 B
TypeScript
export interface modelUI {
id: string;
name?: string;
}
export declare class modelService {
id?: string;
type: string;
}
export interface MapTree {
[index: number]: {
fromPath?: string[];
toPath?: string[];
toValue?: any;
toFunction?: any;
};
length: number;
}
export interface Mapper<I, O> {
uiToServiceMapTree: MapTree;
serviceToUiMapTree: MapTree;
toUIModel(data: I): O;
toServiceModel(data: O): I;
}
export declare function switchModel<I, O>(input: I, mapTree: MapTree): O;
/**
*
* @param obj the object to be cleaned
* @param keys the keys in the object to be clened
*
* Any property with value null will be deleted
* Any property mentioned in the key array will be deleted
*/
export declare function cleanObject(obj: any, keysToRemove?: string[]): any;