diff --git a/examples/basic/package.json b/examples/basic/package.json index 25ab93ee..46975ad4 100644 --- a/examples/basic/package.json +++ b/examples/basic/package.json @@ -12,7 +12,6 @@ "start": "jiti ./index.ts", "spinner": "jiti ./spinner.ts", "spinner-ci": "npx cross-env CI=\"true\" jiti ./spinner-ci.ts", - "changesets": "jiti ./changesets.ts", "workflow": "jiti ./workflow.ts" }, "devDependencies": { diff --git a/examples/spinner-ci.ts b/examples/basic/spinner-ci.ts similarity index 100% rename from examples/spinner-ci.ts rename to examples/basic/spinner-ci.ts diff --git a/examples/basic/workflow.ts b/examples/basic/workflow.ts index 917d635a..c42cc5a1 100644 --- a/examples/basic/workflow.ts +++ b/examples/basic/workflow.ts @@ -6,7 +6,7 @@ import * as p from '@clack/prompts'; .step('name', () => p.text({ message: 'What is your package name?' })) .step('type', () => p.select({ - message: `Pick a project type:`, + message: 'Pick a project type:', initialValue: 'ts', maxItems: 5, options: [ diff --git a/package.json b/package.json index e9084821..1666382f 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "stub": "pnpm -r run build --stub", "build": "pnpm --filter \"@clack/*\" run build", "start": "pnpm run dev", + "dev": "pnpm --filter @example/changesets run start", "format": "biome check --write", "lint": "biome lint --write --unsafe", "type-check": "biome lint && tsc", diff --git a/packages/prompts/src/index.ts b/packages/prompts/src/index.ts index 24c9ee97..33a6a152 100644 --- a/packages/prompts/src/index.ts +++ b/packages/prompts/src/index.ts @@ -784,6 +784,7 @@ export type PromptGroupAwaitedReturn = Prettify<{ [P in keyof T]: PromptAwaitedReturn; }>; +// biome-ignore lint/complexity/noBannedTypes: export type PromptWithOptions = {}> = ( opts: Prettify< { @@ -793,7 +794,7 @@ export type PromptWithOptions TResult; export type PromptGroup = { - [P in keyof T]: PromptWithOptions>, void | Promise>; + [P in keyof T]: PromptWithOptions>, undefined | Promise>; }; export interface PromptGroupOptions { @@ -889,6 +890,7 @@ type WorkflowStep = { condition?: PromptWithOptions; }; +// biome-ignore lint/complexity/noBannedTypes: class WorkflowBuilder = {}> { private results: TResults = {} as TResults; private steps: WorkflowStep[] = [];