@sheetxl/models
Version:
Models - A Headless javascript spreadsheet library.
13 lines • 709 B
TypeScript
/**
* Recursively converts a type into a derived type where any field can be a string. This is useful for serializing/deserializing.
*/
export type SerializableProperties<T> = Partial<{
[Property in keyof T]: T[Property] | string | null | SerializableProperties<T[Property]>;
}>;
/**
* Recursively converts a type into a derived type where any field can be a string or a function that takes the old value.
*/
export type UpdatableProperties<T> = Partial<{
[Property in keyof T]: T[Property] | string | null | UpdatableProperties<T[Property]> | ((value: T[Property], resolveShorthands?: (value: string | T[Property]) => T[Property]) => T[Property] | string);
}>;
//# sourceMappingURL=types.d.ts.map