[cli] Refactor src/index to TypeScript (#6602)

Refactors the CLI entrypoint `src/index.js` to TypeScript.
This commit is contained in:
Nathan Rajlich
2021-08-27 12:48:31 -07:00
committed by GitHub
parent f221f041d0
commit 676a3d2568
24 changed files with 145 additions and 123 deletions

View File

@@ -88,7 +88,9 @@ function _createOutput({ debug: debugEnabled = false }: OutputOptions = {}) {
}
}
function prettyError(err: Error & { link?: string; action?: string }) {
function prettyError(
err: Pick<Error, 'message'> & { link?: string; action?: string }
) {
return error(err.message, undefined, err.link, err.action);
}