-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
64 lines (54 loc) · 986 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
export interface SelectionPromptAnswer {
template: string;
}
export interface ConfirmationPromptAnswer {
okay: boolean;
}
export interface NameFilePromptAnswer {
filename: string;
}
export enum FilterOption {
WEB = 'web',
MOBILE = 'mobile',
CLASS = 'class',
FUNC = 'func',
JS = 'js',
TS = 'ts',
JSX = 'jsx',
TSX = 'tsx'
}
export interface Arguments {
filter?: FilterOption[];
templates?: TemplateOptionAlias[];
}
export enum Platform {
WEB = 'WEB',
MOBILE = 'MOBILE',
SHARED = 'SHARED'
}
export enum Shape {
FUNCTION = 'FUNC',
CLASS = 'CLASS',
MIXED = 'MIXED'
}
export enum Syntax {
JS = 'JS',
TS = 'TS'
}
export enum File {
JS = 'js',
JSX = 'jsx',
TS = 'ts',
TSX = 'tsx'
}
export type TemplateOptionAlias = string;
export interface TemplateOption {
alias: TemplateOptionAlias;
description: string;
platform: Platform;
shape: Shape;
syntax: Syntax;
template: string;
fileType: File;
defaultFileName?: string;
}