@@ -203,7 +203,6 @@ export abstract class BasePromptSession {
203203 * @param framework to get project library for
204204 */
205205 protected async getProjectLibrary ( framework : Framework ) : Promise < ProjectLibrary > {
206- let projectLibrary : ProjectLibrary ;
207206 const projectLibraries = this . getProjectLibNames ( framework ) ;
208207
209208 const projectRes = await this . getUserInput ( {
@@ -212,36 +211,29 @@ export abstract class BasePromptSession {
212211 message : "Choose the type of project:" ,
213212 choices : projectLibraries
214213 } ) ;
215- projectLibrary = this . templateManager . getProjectLibraryByName ( framework , projectRes ) ;
216-
217- return projectLibrary ;
214+ return this . templateManager . getProjectLibraryByName ( framework , projectRes ) ;
218215 }
219216
220217 /**
221218 * Gets project template from user input, or default if provided `projectLibrary` has a single template
222219 * @param projectLibrary to get theme for
223220 */
224221 protected async getProjectTemplate ( projectLibrary : ProjectLibrary ) : Promise < ProjectTemplate > {
225- let projTemplate : ProjectTemplate ;
226-
227222 const componentNameRes = await this . getUserInput ( {
228223 type : "list" ,
229224 name : "projTemplate" ,
230225 message : "Choose project template:" ,
231226 choices : Util . formatChoices ( projectLibrary . projects )
232227 } ) ;
233- projTemplate = projectLibrary . projects . find ( x => x . name === componentNameRes ) ;
234-
235- return projTemplate ;
228+ return projectLibrary . projects . find ( x => x . name === componentNameRes ) ;
236229 }
237230
238231 /**
239232 * Gets the theme from the user input, or default if provided @param projectLibrary has a single theme
240233 * @param projectLibrary to get theme for
241234 */
242235 protected async getTheme ( projectLibrary : ProjectLibrary ) : Promise < string > {
243- let theme : string ;
244- theme = await this . getUserInput ( {
236+ const theme = await this . getUserInput ( {
245237 type : "list" ,
246238 name : "theme" ,
247239 message : "Choose the theme for the project:" ,
@@ -500,7 +492,6 @@ export abstract class BasePromptSession {
500492 * @param component to get template for
501493 */
502494 private getTemplateTask : Task < PromptTaskContext > = async ( _runner , context ) => {
503- let selectedTemplate : Template ;
504495 const templates : Template [ ] = context . component . templates ;
505496
506497 const templateRes = await this . getUserInput ( {
@@ -514,7 +505,7 @@ export abstract class BasePromptSession {
514505 return WIZARD_BACK_OPTION ;
515506 }
516507
517- selectedTemplate = templates . find ( ( value , i , obj ) => {
508+ const selectedTemplate = templates . find ( ( value , i , obj ) => {
518509 return value . name === templateRes ;
519510 } ) ;
520511
0 commit comments