mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
SourceLocation can be null
This commit is contained in:
1 parent
3f2b346ba0
commit
e9faa5b90d
1 file changed
+3
-3
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user