Skip to content

Commit 464c2ef

Browse files
committed
refactor: remove typescript
1 parent 784bce1 commit 464c2ef

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

packages/babel-plugin-resolve-type/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@vue/babel-plugin-resolve-type",
33
"version": "0.0.0",
4-
"description": "Babel plugin for resolving Vue types",
4+
"description": "Babel plugin for resolving Vue types.",
55
"author": "三咲智子 <[email protected]>",
66
"homepage": "https://github.com/vuejs/babel-plugin-jsx/tree/dev/packages/babel-plugin-resolve-type#readme",
77
"license": "MIT",
@@ -36,11 +36,11 @@
3636
"@babel/code-frame": "^7.22.10",
3737
"@babel/helper-module-imports": "^7.22.5",
3838
"@babel/parser": "^7.22.11",
39-
"@babel/plugin-syntax-typescript": "^7.22.5",
4039
"@vue/compiler-sfc": "npm:@vue/compiler-sfc-canary@minor"
4140
},
4241
"devDependencies": {
4342
"@babel/core": "^7.22.11",
43+
"@babel/plugin-syntax-typescript": "^7.22.5",
4444
"@types/babel__code-frame": "^7.0.3",
4545
"@types/babel__helper-module-imports": "^7.18.0",
4646
"vue": "^3.3.4"

packages/babel-plugin-resolve-type/src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import type * as BabelCore from '@babel/core';
22
import { parseExpression } from '@babel/parser';
3-
// @ts-expect-error no dts
4-
import typescript from '@babel/plugin-syntax-typescript';
53
import {
64
type SimpleTypeResolveContext,
75
type SimpleTypeResolveOptions,
@@ -19,7 +17,6 @@ export default ({
1917

2018
return {
2119
name: 'babel-plugin-resolve-type',
22-
inherits: typescript,
2320
pre(file) {
2421
const filename = file.opts.filename || 'unknown.js';
2522
helpers = new Set();

packages/babel-plugin-resolve-type/test/resolve-type.test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { transformAsync } from '@babel/core';
2+
// @ts-expect-error missing types
3+
import typescript from '@babel/plugin-syntax-typescript';
24
import ResolveType from '../src';
35

46
async function transform(code: string): Promise<string> {
57
const result = await transformAsync(code, {
6-
plugins: [[ResolveType, { isTSX: true }]],
8+
plugins: [[typescript, { isTSX: true }], ResolveType],
79
});
810
return result!.code!;
911
}

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)