UNPKG

create-abi

Version:

Interactive CLI for create Abi.js projects.

117 lines (114 loc) 6.11 kB
import * as kleur_colors from 'kleur/colors'; export { cancel, intro, note, outro, spinner } from '@clack/prompts'; declare function isUnicodeSupported(): boolean; declare const icon: { readonly success: "✅" | "[OK]"; readonly error: "❌" | "[ERROR]"; readonly info: "ℹ️" | "[INFO]"; readonly warning: "⚠️" | "[WARN]"; readonly debug: "🐞" | "[DEBUG]"; readonly verbose: "🔍" | "[DETAILS]"; readonly line: "──" | "----"; }; declare const color: { readonly red: typeof kleur_colors.print; readonly green: typeof kleur_colors.print; readonly blue: typeof kleur_colors.print; readonly yellow: typeof kleur_colors.print; readonly magenta: typeof kleur_colors.print; readonly cyan: typeof kleur_colors.print; readonly gray: typeof kleur_colors.print; readonly grey: typeof kleur_colors.print; readonly white: typeof kleur_colors.print; readonly black: typeof kleur_colors.print; }; declare const background: { readonly red: typeof kleur_colors.print; readonly green: typeof kleur_colors.print; readonly blue: typeof kleur_colors.print; readonly yellow: typeof kleur_colors.print; readonly magenta: typeof kleur_colors.print; readonly cyan: typeof kleur_colors.print; readonly white: typeof kleur_colors.print; readonly black: typeof kleur_colors.print; }; declare const style: { readonly reset: typeof kleur_colors.print; readonly bold: typeof kleur_colors.print; readonly dim: typeof kleur_colors.print; readonly italic: typeof kleur_colors.print; readonly underline: typeof kleur_colors.print; readonly inverse: typeof kleur_colors.print; readonly hidden: typeof kleur_colors.print; readonly strikethrough: typeof kleur_colors.print; }; type Icon = keyof typeof icon; type Color = keyof typeof color; type Background = keyof typeof background; type Style = keyof typeof style; type OutputOptions = Partial<{ icon: Icon; color: Color; bg: Background; style: Style; }>; interface Stringeable { toString(): string; } declare class Output extends String implements Stringeable { constructor(value: string, options?: OutputOptions); append(suffix: string): Output; prepend(prefix: string): Output; apply(options: OutputOptions): void; icon(name: Icon): Output; color(name: Color): Output; bg(name: Background): Output; style(name: Style): Output; toString(): string; } declare function output(message: string, options: OutputOptions): Output; declare function success(message: string): string; declare function error(message: string): string; declare function info(message: string): string; declare function warn(message: string): string; declare function debug(message: string): string; declare function verbose(message: string): string; declare function title(message: string): string; declare function printSuccess(message: string, ln?: number): void; declare function printError(message: string, ln?: number): void; declare function printInfo(message: string, ln?: number): void; declare function printWarning(message: string, ln?: number): void; declare function printDebug(message: string, ln?: number): void; declare function printTitle(message: string): void; declare function printVerbose(message: string): void; declare function logInfo(message: string): void; declare function logSuccess(message: string): void; declare function logStep(message: string): void; declare function logWarning(message: string): void; declare function logError(message: string): void; declare function panic(message: string): never; declare function newLine(count?: number): string; declare function scanString(message: string, initialValue: undefined, it?: boolean): Promise<typeof it extends true ? string : undefined>; declare function scanString(message: string, initialValue: string, it?: boolean): Promise<string>; declare function scanChoice<T extends string>(message: string, options: { value: string; label: string; }[], initialValue: undefined, it?: boolean): Promise<typeof it extends true ? T : undefined>; declare function scanChoice<T extends string>(message: string, options: { value: string; label: string; }[], initialValue: T, it?: boolean): Promise<T>; declare function scanBoolean(message: string, initialValue: undefined, it?: boolean, yes?: boolean, no?: boolean): Promise<typeof it extends true ? boolean : typeof no extends true ? false : typeof yes extends true ? true : undefined>; declare function scanBoolean(message: string, initialValue: boolean, it?: boolean, yes?: boolean, no?: boolean): Promise<typeof no extends true ? false : typeof yes extends true ? true : boolean>; declare function ensureString<T extends string>(input: any, validate?: (v: string) => v is T): asserts input is T; declare function ensureNumber<T extends number>(input: any, validate?: (v: number) => v is T): asserts input is T; declare function ensureBoolean(input: any): asserts input is boolean; declare function ensureTrue(input: any): asserts input is true; declare function ensureFalse(input: any): asserts input is false; declare function ensureType<T, U>(input: any, validate: (v: T) => U, expected: string): asserts input is T; declare function ensure<T, U>(input: T, validate: (v: T) => U, expected?: any, provided?: any): asserts input is T; declare function isString(input: any): input is string; declare function isNumber(input: any): input is number; declare function isBoolean(input: any): input is boolean; declare function isCanceled(input: any): boolean; export { type Background, type Color, type Icon, Output, type OutputOptions, type Style, background, color, debug, ensure, ensureBoolean, ensureFalse, ensureNumber, ensureString, ensureTrue, ensureType, error, icon, info, isBoolean, isCanceled, isNumber, isString, isUnicodeSupported, logError, logInfo, logStep, logSuccess, logWarning, newLine, output, panic, printDebug, printError, printInfo, printSuccess, printTitle, printVerbose, printWarning, scanBoolean, scanChoice, scanString, style, success, title, verbose, warn };