Skip to content

Commit d654e44

Browse files
author
DimitarTachev
committed
refactor: fix pr comments
1 parent b470c6c commit d654e44

File tree

1 file changed

+20
-33
lines changed

1 file changed

+20
-33
lines changed

lib/commands/create-project.ts

+20-33
Original file line numberDiff line numberDiff line change
@@ -141,74 +141,61 @@ or --js flags.)
141141
}
142142

143143
private getJsTemplates() {
144-
const templates: {
145-
key?: string;
146-
value: string;
147-
description?: string;
148-
}[] = [];
149-
templates.push({
144+
const templates = [{
150145
key: CreateProjectCommand.HelloWorldTemplateKey,
151146
value: "tns-template-hello-world",
152147
description: CreateProjectCommand.HelloWorldTemplateDescription
153-
});
154-
templates.push({
148+
},
149+
{
155150
key: CreateProjectCommand.DrawerTemplateKey,
156151
value: "tns-template-drawer-navigation",
157152
description: CreateProjectCommand.DrawerTemplateDescription
158-
});
159-
templates.push({
153+
},
154+
{
160155
key: CreateProjectCommand.TabsTemplateKey,
161156
value: "tns-template-tab-navigation",
162157
description: CreateProjectCommand.TabsTemplateDescription
163-
});
158+
}];
159+
164160
return templates;
165161
}
166162

167163
private getTsTemplates() {
168-
const templates: {
169-
key?: string;
170-
value: string;
171-
description?: string;
172-
}[] = [];
173-
templates.push({
164+
const templates = [{
174165
key: CreateProjectCommand.HelloWorldTemplateKey,
175166
value: "tns-template-hello-world-ts",
176167
description: CreateProjectCommand.HelloWorldTemplateDescription
177-
});
178-
templates.push({
168+
},
169+
{
179170
key: CreateProjectCommand.DrawerTemplateKey,
180171
value: "tns-template-drawer-navigation-ts",
181172
description: CreateProjectCommand.DrawerTemplateDescription
182-
});
183-
templates.push({
173+
},
174+
{
184175
key: CreateProjectCommand.TabsTemplateKey,
185176
value: "tns-template-tab-navigation-ts",
186177
description: CreateProjectCommand.TabsTemplateDescription
187-
});
178+
}];
179+
188180
return templates;
189181
}
190182

191183
private getNgFlavors() {
192-
const templates: {
193-
key?: string;
194-
value: string;
195-
description?: string;
196-
}[] = [];
197-
templates.push({
184+
const templates = [{
198185
key: CreateProjectCommand.HelloWorldTemplateKey,
199186
value: "tns-template-hello-world-ng",
200187
description: CreateProjectCommand.HelloWorldTemplateDescription
201-
});
202-
templates.push({
188+
},
189+
{
203190
key: CreateProjectCommand.DrawerTemplateKey,
204191
value: "tns-template-drawer-navigation-ng",
205192
description: CreateProjectCommand.DrawerTemplateDescription
206-
});
207-
templates.push({
193+
},
194+
{
208195
key: CreateProjectCommand.TabsTemplateKey,
209196
value: "tns-template-tab-navigation-ng",
210197
description: CreateProjectCommand.TabsTemplateDescription
211-
});
198+
}];
212199

213200
return templates;
214201
}

0 commit comments

Comments
 (0)