Skip to content

Commit c7f7298

Browse files
EverspaceGatsbyJS Bot
authored and
GatsbyJS Bot
committed
chore(gatsby): Improve typings for reporter (#16441)
`panic`, `painicOnBuild`, and `error` should now match what is described on https://www.gatsbyjs.org/docs/node-api-helpers/#reporter
1 parent 7419a1a commit c7f7298

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/gatsby/index.d.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -937,15 +937,16 @@ export interface Store {
937937
}
938938

939939
type logMessageType = (format: string, ...args: any[]) => void
940+
type logErrorType = (message: string, error?: Error) => void
940941

941942
export interface Reporter {
942943
stripIndent: Function
943944
format: object
944945
setVerbose(isVerbose: boolean): void
945946
setNoColor(isNoColor: boolean): void
946-
panic(...args: any[]): void
947-
panicOnBuild(...args: any[]): void
948-
error(message: string, error: Error): void
947+
panic: logErrorType
948+
panicOnBuild: logErrorType
949+
error: logErrorType
949950
uptime(prefix: string): void
950951
success: logMessageType
951952
verbose: logMessageType

0 commit comments

Comments
 (0)