INNER CODE UNIT · TypeScript

defineCookbookCommand

akirarika/milkio · packages/cookbook-command/index.ts:10

export async function defineCookbookCommand<Handler extends CookbookCommandHandler>(handler: Handler): Promise<Handler> {
    return handler;
}

export type CookbookCommandHandler = (utils: {
    log: (typeof consola)["log"];
    info: (typeof consola)["info"];
    warn: (typeof consola)["warn"];
    error: (typeof consola)["error"];
    success: (typeof consola)["success"];
    debug: (typeof consola)["debug"];
    fatal: (typeof consola)["fatal"];
    trace: (typeof consola)["trace"];
    start: (typeof consola)["start"];
    box: (typeof consola)["box"];
    prompt: CookbookPrompt;
    getScriptPath: () => string;
    getWorkspacePath: () => string;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…