Skip to content

Commit

Permalink
chore: rebase branch
Browse files Browse the repository at this point in the history
  • Loading branch information
orochaa committed Dec 15, 2024
1 parent 299eb82 commit 4365f19
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/basic/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion packages/prompts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,7 @@ export type PromptGroupAwaitedReturn<T> = Prettify<{
[P in keyof T]: PromptAwaitedReturn<T[P]>;
}>;

// biome-ignore lint/complexity/noBannedTypes: <explanation>
export type PromptWithOptions<TResults, TResult, TOptions extends Record<string, unknown> = {}> = (
opts: Prettify<
{
Expand All @@ -769,7 +770,7 @@ export type PromptWithOptions<TResults, TResult, TOptions extends Record<string,
) => TResult;

export type PromptGroup<T> = {
[P in keyof T]: PromptWithOptions<Partial<Omit<T, P>>, void | Promise<T[P] | void>>;
[P in keyof T]: PromptWithOptions<Partial<Omit<T, P>>, undefined | Promise<T[P] | undefined>>;
};

export interface PromptGroupOptions<T> {
Expand Down Expand Up @@ -865,6 +866,7 @@ type WorkflowStep<TName extends string, TResults, TResult = unknown> = {
condition?: PromptWithOptions<TResults, boolean>;
};

// biome-ignore lint/complexity/noBannedTypes: <explanation>
class WorkflowBuilder<TResults extends Record<string, unknown> = {}> {
private results: TResults = {} as TResults;
private steps: WorkflowStep<string, TResults>[] = [];
Expand Down

0 comments on commit 4365f19

Please sign in to comment.