20 lines
309 B
TypeScript
20 lines
309 B
TypeScript
type VariantRow = {
|
|
kind: string;
|
|
size: number;
|
|
key: string;
|
|
};
|
|
|
|
type VariantShape = {
|
|
kind: string;
|
|
size: number;
|
|
key: string;
|
|
};
|
|
|
|
export function shapeVariants(rows: VariantRow[]): VariantShape[] {
|
|
return rows.map((row) => ({
|
|
kind: row.kind,
|
|
size: row.size,
|
|
key: row.key,
|
|
}));
|
|
}
|