🏷️ Provide a better return type for error

This commit is contained in:
trickypr 2022-03-27 16:32:18 +11:00
parent 2bdcbb0736
commit 4ee227efbd

View file

@ -47,7 +47,7 @@ class Log {
console.log(`\n${chalk.greenBright.bold('SUCCESS')}`, ...args)
}
error(...args: unknown[]): void {
error(...args: unknown[]): never {
if (args[0] instanceof Error) {
throw args[0]
}