Skip to content

Commit

Permalink
Chore (password): Clean types (follow-up to #1272)
Browse files Browse the repository at this point in the history
  • Loading branch information
SBoudrias committed Jul 28, 2023
1 parent 8b02d17 commit 51c98b9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/password/src/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ import input from '@inquirer/input';
import chalk from 'chalk';

type InputConfig = Parameters<typeof input>[0];
type PasswordConfig = InputConfig & {
type PasswordConfig = Omit<InputConfig, 'transformer' | 'default'> & {
mask?: boolean | string;
};

const password: Prompt<string, Omit<PasswordConfig, 'transformer' | 'default'>> = (
config,
context,
) => {
const password: Prompt<string, PasswordConfig> = (config, context) => {
if ('transformer' in config) {
throw new Error(
'Inquirer password prompt do not support custom transformer function. Use the input prompt instead.',
Expand Down

0 comments on commit 51c98b9

Please sign in to comment.