Kotlin-scaffold/index.d.ts
2021-04-03 22:40:56 +02:00

43 lines
1.0 KiB
TypeScript

/**
* Print a message to the console
*
* @param message
*/
declare function echo(message: string): void
declare interface prompt {
/**
* Prompt a user for text input
*
* @param text - The text to display for the prompt
* @param def - A default value
*/
string(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
*/
boolean(text: string, def?: boolean): boolean
}
/**
* Renders a template
*
* @param name - The template name
* @param context - The template context
* @param output - The output path, if absent, default to the template name
*/
declare function render(name: string, context: any, output?: string): string
/**
* Copy a file
*
* @param input - The input path
* @param output - The output path, if absent, default to the input path
*/
declare function copy(input: string, output?: string): void