@samitouri / QOS-React-2 / commits / e9faa5b90d

SourceLocation can be null

Lauren Tan committed Jun 22, 2023 at 10:18 UTC e9faa5b90d8e5f979216e725eec2d4ca91f78807
1 file changed +3 -3
compiler/forget/packages/babel-plugin-react-forget/src/CompilerError.ts
+3 -3
@@ -72,7 +72,7 @@ export class CompilerError extends Error {
72 static invariant(
73 condition: unknown,
74 reason: string,
75 - loc: SourceLocation,
75 + loc: SourceLocation | null,
76 description: string | null = null
77 ): asserts condition {
78 if (!condition) {
@@ -91,7 +91,7 @@ export class CompilerError extends Error {
91
92 static todo(
93 reason: string,
94 - loc: SourceLocation,
94 + loc: SourceLocation | null,
95 description: string | null = null
96 ): never {
97 const errors = new CompilerError();
@@ -108,7 +108,7 @@ export class CompilerError extends Error {
108
109 static invalidInput(
110 reason: string,
111 - loc: SourceLocation,
111 + loc: SourceLocation | null,
112 description: string | null = null
113 ): never {
114 const errors = new CompilerError();