UNPKG

@manuth/generator-wsc-package

Version:

A Generator for WoltLab Suite Core Packages.

51 lines (50 loc) 1.95 kB
/// <reference types="yeoman-generator" /> import { GeneratorOptions } from "@manuth/extended-yo-generator"; import { ObjectLiteralExpression, SourceFile } from "ts-morph"; import { LocalInstructionComponent } from "../Components/LocalInstructionComponent.js"; import { ILocalComponentOptions } from "../Settings/ILocalComponentOptions.js"; import { IWoltLabSettings } from "../Settings/IWoltLabSettings.js"; import { InstructionFileMapping } from "./InstructionFileMapping.js"; /** * Provides the functionality to generate instruction-files for local instructions. * * @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 class LocalFileInstructionMapping<TSettings extends IWoltLabSettings, TOptions extends GeneratorOptions, TComponentOptions extends ILocalComponentOptions> extends InstructionFileMapping<TSettings, TOptions, TComponentOptions> { /** * The component to create an instruction-file for. */ private localInstructionComponent; /** * Initializes a new instance of the {@link LocalFileInstructionMapping `LocalFileInstructionMapping<TSettings, TOptions, TComponentOptions>`} class. * * @param component * The component to create an instruction-file for. */ constructor(component: LocalInstructionComponent<TSettings, TOptions, TComponentOptions>); /** * @inheritdoc */ protected get Component(): LocalInstructionComponent<TSettings, TOptions, TComponentOptions>; /** * @inheritdoc */ protected get InstructionOptions(): ObjectLiteralExpression; /** * @inheritdoc * * @param file * The {@link SourceFile `SourceFile`} to transform. * * @returns * The transformed file. */ protected Transform(file: SourceFile): Promise<SourceFile>; }