[cli] Update to TypeScript v4.7.4 (#8232)

This commit is contained in:
Nathan Rajlich
2022-07-25 16:08:14 -07:00
committed by GitHub
parent c397fd1856
commit 081b38466b
87 changed files with 914 additions and 951 deletions

View File

@@ -2,6 +2,7 @@ import chalk from 'chalk';
import renderLink from './link';
import wait, { StopSpinner } from './wait';
import type { WritableTTY } from '../../types';
import { errorToString } from '../is-error';
export interface OutputOptions {
debug?: boolean;
@@ -79,10 +80,13 @@ export class Output {
}
};
prettyError = (
err: Pick<Error, 'message'> & { link?: string; action?: string }
) => {
return this.error(err.message, undefined, err.link, err.action);
prettyError = (err: unknown) => {
return this.error(
errorToString(err),
undefined,
(err as any).link,
(err as any).action
);
};
ready = (str: string) => {