Skip to content

Commit

Permalink
fix: tsSatisfiesExpression check w/ duplicated @babel/types (#15121)
Browse files Browse the repository at this point in the history
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
  • Loading branch information
liuxingbaoyu and JLHwung committed Nov 3, 2022
1 parent b5a6931 commit a5e4038
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/babel-plugin-transform-typescript/src/index.ts
@@ -1,6 +1,6 @@
import { declare } from "@babel/helper-plugin-utils";
import syntaxTypeScript from "@babel/plugin-syntax-typescript";
import { types as t, template } from "@babel/core";
import type { types as t } from "@babel/core";
import { injectInitialization } from "@babel/helper-create-class-features-plugin";
import type { Binding, NodePath, Scope } from "@babel/traverse";
import type { Options as SyntaxOptions } from "@babel/plugin-syntax-typescript";
Expand Down Expand Up @@ -96,6 +96,10 @@ type ExtraNodeProps = {
};

export default declare((api, opts: Options) => {
// `@babel/core` and `@babel/types` are bundled in some downstream libraries.
// Ref: https://github.com/babel/babel/issues/15089
const { types: t, template } = api;

api.assertVersion(7);

const JSX_PRAGMA_REGEX = /\*?\s*@jsx((?:Frag)?)\s+([^\s]+)/;
Expand Down

0 comments on commit a5e4038

Please sign in to comment.