mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
[playground] Fix CompilerError mismatch (#34420)
The compiler playground was crashing at any small syntax errors in the `Input` panel due to updating the `CompilerErrorDetailOptions` type in #34401. Updated the option to take in a `ErrorCategory` instead. --------- Co-authored-by: lauren <poteto@users.noreply.github.com>
This commit is contained in:
parent
d4374b3ae3
commit
3d9d22cbdb
|
|
@ -13,7 +13,7 @@ import BabelPluginReactCompiler, {
|
|||
CompilerErrorDetail,
|
||||
CompilerDiagnostic,
|
||||
Effect,
|
||||
ErrorSeverity,
|
||||
ErrorCategory,
|
||||
parseConfigPragmaForTests,
|
||||
ValueKind,
|
||||
type Hook,
|
||||
|
|
@ -258,7 +258,7 @@ function compile(
|
|||
console.error(err);
|
||||
error.details.push(
|
||||
new CompilerErrorDetail({
|
||||
severity: ErrorSeverity.Invariant,
|
||||
category: ErrorCategory.Invariant,
|
||||
reason: `Unexpected failure when transforming input! ${err}`,
|
||||
loc: null,
|
||||
suggestions: null,
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ export {
|
|||
CompilerDiagnostic,
|
||||
CompilerSuggestionOperation,
|
||||
ErrorSeverity,
|
||||
ErrorCategory,
|
||||
LintRules,
|
||||
type CompilerErrorDetailOptions,
|
||||
type CompilerDiagnosticOptions,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user