Files
web2.0-frontend/src/components/Widgets/SignupQuestionsWidget/common.ts
T
2021-09-01 20:20:30 +03:00

38 lines
577 B
TypeScript

export interface Question {
id: string;
name: string;
type: OptionTypes;
enum?: string[];
enumNames?: string[];
description?: string;
required?: boolean;
}
export interface InputProps {
index: number;
value: string | string[];
questions: Question[];
type: string;
}
export type OptionTypes =
"text" |
"info" |
"integer" |
"radiobutton" |
"checkbox" |
"email" |
"name";
export const optionTypes = [
"text",
"info",
"integer",
"radiobutton",
"checkbox",
"email",
"name",
];
export class SignupQuestionError extends Error { }