We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fefcf3b commit 5fd624aCopy full SHA for 5fd624a
.changeset/old-times-double.md
@@ -0,0 +1,5 @@
1
+---
2
+'@graphprotocol/graph-ts': patch
3
4
+
5
+changed log(CRITICAL) return type to `never` for compiler flow analysis
packages/ts/index.ts
@@ -103,8 +103,10 @@ export namespace log {
103
* @param msg Format string a la "Value = {}, other = {}".
104
* @param args Format string arguments.
105
*/
106
- export function critical(msg: string, args: Array<string>): void {
107
- log.log(Level.CRITICAL, format(msg, args));
+ export function critical(msg: string, args: Array<string>): never {
+ const message = format(msg, args);
108
+ log.log(Level.CRITICAL, message);
109
+ throw new Error(message);
110
}
111
112
/**
0 commit comments