Skip to content

Commit

Permalink
fix: mock.pressKey key param
Browse files Browse the repository at this point in the history
  • Loading branch information
Mist3rBru committed Nov 10, 2023
1 parent 3192bf7 commit 03a69fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/utils/mock.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import type { Key } from 'node:readline';
import Prompt from '../prompts/prompt';
import { ClackState } from '../types';

export type MockResult<TPrompt extends Prompt = Prompt> = TPrompt & {
frame: string;
pressKey: (char: string, key: { name: string }) => void;
pressKey: (char: string, key: Key) => void;
setCursor: (cursor: number) => void;
setState: (state: ClackState) => void;
setValue: (value: any) => void;
Expand Down

0 comments on commit 03a69fa

Please sign in to comment.