1
0
Fork 0
freesewing/dist/lib/types.d.ts

36 lines
883 B
TypeScript
Raw Normal View History

2018-07-10 19:29:09 +02:00
export declare 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 declare type DraftMode = "sample" | "compare" | "draft";
export declare type CompareGroup = "men" | "women";
export declare type Units = "metric" | "imperial";
export interface DraftConfig {
mode: DraftMode;
units?: Units;
options: PatternOption[];
measurements?: {
[index: string]: number;
};
sa?: number;
scope?: string[];
theme?: string;
}