From e9faa5b90d8e5f979216e725eec2d4ca91f78807 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Thu, 22 Jun 2023 10:18:42 -0400 Subject: [PATCH] SourceLocation can be null --- .../packages/babel-plugin-react-forget/src/CompilerError.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/forget/packages/babel-plugin-react-forget/src/CompilerError.ts b/compiler/forget/packages/babel-plugin-react-forget/src/CompilerError.ts index d0c8b9bcd1..64151c9eb9 100644 --- a/compiler/forget/packages/babel-plugin-react-forget/src/CompilerError.ts +++ b/compiler/forget/packages/babel-plugin-react-forget/src/CompilerError.ts @@ -72,7 +72,7 @@ export class CompilerError extends Error { static invariant( condition: unknown, reason: string, - loc: SourceLocation, + loc: SourceLocation | null, description: string | null = null ): asserts condition { if (!condition) { @@ -91,7 +91,7 @@ export class CompilerError extends Error { static todo( reason: string, - loc: SourceLocation, + loc: SourceLocation | null, description: string | null = null ): never { const errors = new CompilerError(); @@ -108,7 +108,7 @@ export class CompilerError extends Error { static invalidInput( reason: string, - loc: SourceLocation, + loc: SourceLocation | null, description: string | null = null ): never { const errors = new CompilerError();