Skip to content

Commit

Permalink
fix: stdio in password is now optional and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TDP17 authored and SBoudrias committed Jul 5, 2022
1 parent 3f322dc commit 061ea29
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/input/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import {
isEnterKey,
isBackspaceKey,
AsyncPromptConfig,
} from '@inquirer/core/src';
} from '@inquirer/core';
import chalk from 'chalk';

export type InputConfig = AsyncPromptConfig & {
default?: string;
transformer?: (value: string, { isFinal }: { isFinal: boolean }) => string;
filter: (input: string) => string
filter?: (input: string) => string
};

export default createPrompt<string, InputConfig>((config, done) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/password/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type PasswordConfig = InputConfig & {
mask?: boolean | string;
};

export default (config: PasswordConfig, stdio: Parameters<typeof input>[1]) => {
export default (config: PasswordConfig, stdio?: Parameters<typeof input>[1]) => {
if (config.transformer) {
throw new Error(
'Inquirer password prompt do not support custom transformer function. Use the input prompt instead.'
Expand Down
2 changes: 1 addition & 1 deletion packages/rawlist/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
usePrefix,
isEnterKey,
AsyncPromptConfig,
} from '@inquirer/core/src';
} from '@inquirer/core';
import chalk from 'chalk';

const numberRegex = /[0-9]+/;
Expand Down

0 comments on commit 061ea29

Please sign in to comment.