UNPKG

templates-mo

Version:

Templates is a scaffolding framework that makes code generation simple, dynamic, and reusable. Generate files, parts of your app, or whole project structures—without the repetitive copy-pasting

27 lines (26 loc) • 1.09 kB
import { SettingsFilePrompt, AnswersHash, AnswersData } from "../types/settings"; import type Prompter from './prompter'; export default class Prompt { name: SettingsFilePrompt['name']; message: SettingsFilePrompt['message']; description: SettingsFilePrompt['description']; aliases: SettingsFilePrompt['aliases']; tpsType: SettingsFilePrompt['tpsType']; type: SettingsFilePrompt['type']; default: SettingsFilePrompt['default']; hidden: SettingsFilePrompt['hidden']; choices?: SettingsFilePrompt['choices']; validate: SettingsFilePrompt['validate']; filter: SettingsFilePrompt['filter']; transformer: SettingsFilePrompt['transformer']; when: SettingsFilePrompt['when']; pageSize: SettingsFilePrompt['pageSize']; prefix: SettingsFilePrompt['prefix']; suffix: SettingsFilePrompt['suffix']; constructor(prompt: SettingsFilePrompt, prompter: Prompter); private wrapFunc; isData(): boolean; isPkg(): boolean; getDefaultValue(answers: AnswersHash): AnswersData; answerWith<T>(answers: Record<string, T>): T; }