shineout
Version:
A components library for React
26 lines (25 loc) • 882 B
TypeScript
export declare function insertPoint(name: string): string;
type Result = {
[x: string]: unknown;
};
export declare function flatten(data: Result, skipArray?: boolean): Result;
export declare function unflatten<T extends {}>(rawdata: T): T | {
[name: string]: any;
};
type insertObject = {
[x: string]: unknown;
};
export declare function insertValue(obj: insertObject, name: string, index: number, value: any): void;
type SpliceValue = {
[x: string]: [];
};
export declare function spliceValue(obj: SpliceValue, name: keyof SpliceValue & string, index: number): void;
type Source = {
[x: string]: any;
};
export declare const getSthByName: (name: keyof Source & string, source: Source) => any;
export declare const removeSthByName: (name: string, source: {
[x: string]: any;
}) => void;
export declare const flattenArray: <T>(arr1: any[]) => T[];
export {};