1
0
Fork 0
freesewing/lib/types.ts

40 lines
794 B
TypeScript
Raw Normal View History

2018-07-10 19:29:09 +02:00
export type PatternOptionType = "measure" | "percentage" | "angle" | "choice" | "constant";
2018-07-10 12:20:53 +00:00
export interface PatternOption {
2018-07-10 19:29:09 +02:00
id: string;
val: number;
type?: string;
2018-07-10 12:20:53 +00:00
onlyIf?: {
option: string;
oneOf: number[];
}
min?: number;
max?: number;
options?: {
[index: number]: string;
}
}
export interface PatternConfig {
parts: string[];
measurements: string[];
options: PatternOption[];
[propName: string]: any;
}
2018-07-10 19:29:09 +02:00
export type DraftMode = "sample" | "compare" | "draft";
export type CompareGroup = "men" | "women";
export type Units = "metric" | "imperial";
export interface DraftConfig {
mode: DraftMode;
units?: Units;
options: PatternOption[];
measurements?: {
[index:string]: number;
};
sa?: number;
scope?: string[];
theme?: string;
}