UNPKG

@manuth/generator-wsc-package

Version:

A Generator for WoltLab Suite Core Packages.

47 lines (46 loc) 1.8 kB
/// <reference types="yeoman-generator" /> import { GeneratorOptions } from "@manuth/extended-yo-generator"; import { TSProjectTypeScriptFileMapping } from "@manuth/generator-ts-project"; import { SourceFile, ts } from "ts-morph"; import { IWoltLabSettings } from "../Settings/IWoltLabSettings.js"; import { WoltLabGenerator } from "../WoltLabGenerator.js"; /** * Provides the functionality to generate typescript files for the {@link WoltLabGenerator `WoltLabGenerator<TSettings, TOptions>`}. * * @template TSettings * The type of the generator-settings. * * @template TOptions * The type of the generator-options. */ export declare abstract class WoltLabTypeScriptFileMapping<TSettings extends IWoltLabSettings, TOptions extends GeneratorOptions> extends TSProjectTypeScriptFileMapping<TSettings, TOptions> { /** * The generator of the file-mapping. */ private woltLabGenerator; /** * Initializes a new instance of the {@link WoltLabTypeScriptFileMapping `WoltLabTypeScriptFileMapping<TSettings, TOptions>`} class. * * @param generator * The component to create an instruction-file for. */ constructor(generator: WoltLabGenerator<TSettings, TOptions>); /** * @inheritdoc */ get Generator(): WoltLabGenerator<TSettings, TOptions>; /** * Applies the prerequisites required for using the directory name in this file. * * @param file * The file to apply the prerequisites to. */ protected ApplyDirname(file: SourceFile): void; /** * Gets a typescript syntax node for determining the name of the directory of the file. * * @returns * A typescript syntax node for determining the name of the directory of the file. */ protected GetDirname(): ts.Expression; }