46 lines
993 B
TypeScript
46 lines
993 B
TypeScript
/**
|
|
* Print a message to the console
|
|
*
|
|
* @param message
|
|
*/
|
|
declare function echo(message: string): void
|
|
|
|
/**
|
|
* Prompt a user for text input
|
|
*
|
|
* @param text - The text to display for the prompt
|
|
* @param def - A default value
|
|
*/
|
|
declare function prompt(text: string, def?: string): string
|
|
|
|
/**
|
|
* Prompt a user for text input
|
|
*
|
|
* @param text - The text to display for the prompt
|
|
* @param def - A default value
|
|
*/
|
|
declare function promptBoolean(text: string, def?: boolean): boolean
|
|
|
|
/**
|
|
* Renders a template
|
|
*
|
|
* @param name - The template name
|
|
* @param context - The template context
|
|
*/
|
|
declare function render(name: string, context: any): string
|
|
|
|
/**
|
|
* Write a string to a file
|
|
*
|
|
* @param input - The content of the file
|
|
* @param output - The output path
|
|
*/
|
|
declare function write(input: string, output: string): void
|
|
|
|
/**
|
|
* Copy a file
|
|
*
|
|
* @param input - The input path
|
|
* @param output - The output path
|
|
*/
|
|
declare function copy(input: string, output: string): void |