From a92bfd7fdc443fe7ae998c6459fd563586c8756d Mon Sep 17 00:00:00 2001 From: Joe Savona Date: Tue, 10 Oct 2023 13:15:42 -0700 Subject: [PATCH] [be] Factor out named type for JSXText instr variant --- compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts b/compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts index 79cf788e0c..f75b450a27 100644 --- a/compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts +++ b/compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts @@ -692,7 +692,7 @@ export type InstructionValue = value: number | boolean | string | null | undefined; loc: SourceLocation; } - | { kind: "JSXText"; value: string; loc: SourceLocation } + | JSXText | { kind: "BinaryExpression"; operator: t.BinaryExpression["operator"]; @@ -889,6 +889,8 @@ export type Primitive = { loc: SourceLocation; }; +export type JSXText = { kind: "JSXText"; value: string; loc: SourceLocation }; + export type LoadGlobal = { kind: "LoadGlobal"; name: string;