diff --git a/.changeset/old-times-double.md b/.changeset/old-times-double.md deleted file mode 100644 index b3e1afd6b..000000000 --- a/.changeset/old-times-double.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@graphprotocol/graph-ts': patch ---- - -changed log(CRITICAL) return type to `never` for compiler flow analysis diff --git a/packages/ts/index.ts b/packages/ts/index.ts index a49880384..19da31744 100644 --- a/packages/ts/index.ts +++ b/packages/ts/index.ts @@ -101,10 +101,8 @@ export namespace log { * @param msg Format string a la "Value = {}, other = {}". * @param args Format string arguments. */ - export function critical(msg: string, args: Array): never { - const message = format(msg, args); - log(Level.CRITICAL, message); - throw new Error(message); + export function critical(msg: string, args: Array): void { + log(Level.CRITICAL, format(msg, args)); } /**