# GenerateCmd Class

Module
import { GenerateCmd } from "@tsed/cli"
Source/packages/cli/src/commands/generate/GenerateCmd.ts

# Overview

class GenerateCmd implements CommandProvider {
    classNamePipe: ClassNamePipe;
    outputFilePathPipe: OutputFilePathPipe;
    routePipe: RoutePipe;
    srcRenderService: SrcRendererService;
    constructor(providersList: ProvidersInfoService);
    $prompt(initialOptions: Partial<GenerateCmdContext>): ({
        type: string;
        name: string;
        message: string;
        default: string | undefined;
        when: boolean;
        source: (state: any, keyword: string) => Promise<any>;
        choices?: undefined;
    } | {
        type: string;
        name: string;
        message: string;
        default: (state: any) => string;
        when: boolean;
        source?: undefined;
        choices?: undefined;
    } | {
        type: string;
        name: string;
        message: string;
        when(state: any): boolean;
        default: (state: GenerateCmdContext) => string;
        source?: undefined;
        choices?: undefined;
    } | {
        type: string;
        name: string;
        message: (state: any) => string;
        when(state: any): boolean;
        source: (state: any, keyword: string) => Promise<any>;
        default?: undefined;
        choices?: undefined;
    } | {
        type: string;
        name: string;
        message: () => string;
        choices: {
            name: string;
            value: string;
        }[];
        when(state: any): boolean;
        default?: undefined;
        source?: undefined;
    })[];
    $mapContext(ctx: Partial<GenerateCmdContext>): GenerateCmdContext;
    $exec(ctx: GenerateCmdContext): Promise<{
        title: string;
        task: () => Promise<void>;
    }[]>;
}

# Members

classNamePipe: ClassNamePipe

outputFilePathPipe: OutputFilePathPipe

routePipe: RoutePipe

srcRenderService: SrcRendererService

$prompt(initialOptions: Partial<GenerateCmdContext>): ({
     type: string;
     name: string;
     message: string;
     default: string | undefined;
     when: boolean;
     source: (state: any, keyword: string) => Promise<any>;
     choices?: undefined;
 } | {
     type: string;
     name: string;
     message: string;
     default: (state: any) => string;
     when: boolean;
     source?: undefined;
     choices?: undefined;
 } | {
     type: string;
     name: string;
     message: string;
     when(state: any): boolean;
     default: (state: GenerateCmdContext) => string;
     source?: undefined;
     choices?: undefined;
 } | {
     type: string;
     name: string;
     message: (state: any) => string;
     when(state: any): boolean;
     source: (state: any, keyword: string) => Promise<any>;
     default?: undefined;
     choices?: undefined;
 } | {
     type: string;
     name: string;
     message: () => string;
     choices: {
         name: string;
         value: string;
     }[];
     when(state: any): boolean;
     default?: undefined;
     source?: undefined;
 })[];

$mapContext(ctx: Partial<GenerateCmdContext>): GenerateCmdContext

$exec(ctx: GenerateCmdContext): Promise<{
     title: string;
     task: () => Promise<void>;
 }[]>;