@manuth/generator-wsc-package
Version:
A Generator for WoltLab Suite Core Packages.
60 lines (59 loc) • 2.29 kB
TypeScript
/// <reference types="yeoman-generator" />
import { ComponentOptions, GeneratorOptions, Question } from "@manuth/extended-yo-generator";
import inquirer from "inquirer";
import { IWoltLabComponentOptions } from "../Settings/IWoltLabComponentOptions.js";
import { IWoltLabSettings } from "../Settings/IWoltLabSettings.js";
import { WoltLabGenerator } from "../WoltLabGenerator.js";
/**
* Represents a woltlab-component.
*
* @template TSettings
* The type of the generator-settings.
*
* @template TOptions
* The type of the generator-options.
*
* @template TComponentOptions
* The type of the component-options.
*/
export declare abstract class WoltLabComponent<TSettings extends IWoltLabSettings, TOptions extends GeneratorOptions, TComponentOptions extends IWoltLabComponentOptions = IWoltLabComponentOptions> extends ComponentOptions<TSettings, TOptions> {
/**
* The generator of the component.
*/
private woltLabGenerator;
/**
* Initializes a new instance of the {@link WoltLabComponent `WoltLabComponent<TSettings, TOptions, TComponentOptions>`} class.
*
* @param generator
* The generator of the component.
*/
constructor(generator: WoltLabGenerator<TSettings, TOptions>);
/**
* Gets the generator of the component.
*/
get Generator(): WoltLabGenerator<TSettings, TOptions>;
/**
* A question for asking for the component-path.
*/
protected get PathQuestion(): Question<TComponentOptions>;
/**
* Gets the questions for the component-options.
*/
protected get ComponentOptionQuestionCollection(): Array<Question<TComponentOptions>>;
/**
* Gets the prompt-types to register for asking the {@link WoltLabComponent.ComponentOptionQuestionCollection `ComponentOptionQuestionCollection`}.
*/
protected get PromptTypes(): Record<string, inquirer.prompts.PromptConstructor>;
/**
* Gets the questions for asking for the component-options.
*/
protected get ComponentOptionQuestion(): Question<TSettings>;
/**
* Gets the questions of the component.
*/
get Questions(): Array<Question<TSettings>>;
/**
* Gets the component-options that were provided by the user.
*/
get ComponentOptions(): TComponentOptions;
}