Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed Nov 11, 2023
1 parent 6e540e7 commit c9277f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Expand Up @@ -155,7 +155,6 @@ function inferAnnotationFromBinaryExpression(

if (operator !== "===" && operator !== "==") return;

//
let typeofPath: NodePath<t.UnaryExpression>;
let typePath: NodePath<t.Expression>;
if (left.isUnaryExpression({ operator: "typeof" })) {
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-traverse/src/path/inference/util.ts
Expand Up @@ -8,8 +8,8 @@ import {
import type * as t from "@babel/types";

export function createUnionType(
types: Array<t.FlowType | t.TSType>,
): t.FlowType | t.TSType {
types: (t.FlowType | t.TSType)[],
): t.FlowType | t.TSType | undefined {
if (process.env.BABEL_8_BREAKING) {
if (types.every(v => isFlowType(v))) {
return createFlowUnionType(types as t.FlowType[]);
Expand Down

0 comments on commit c9277f4

Please sign in to comment.