@@ -3,18 +3,14 @@ import { parseExpression } from '@babel/parser';
3
3
// @ts -expect-error no dts
4
4
import typescript from '@babel/plugin-syntax-typescript' ;
5
5
import {
6
- type SFCScriptCompileOptions ,
7
6
type SimpleTypeResolveContext ,
7
+ type SimpleTypeResolveOptions ,
8
8
extractRuntimeEmits ,
9
9
extractRuntimeProps ,
10
10
} from '@vue/compiler-sfc' ;
11
11
import { codeFrameColumns } from '@babel/code-frame' ;
12
12
import { addNamed } from '@babel/helper-module-imports' ;
13
13
14
- export interface Options {
15
- compileOptions ?: SFCScriptCompileOptions ;
16
- }
17
-
18
14
function getTypeAnnotation ( node : BabelCore . types . Node ) {
19
15
if (
20
16
'typeAnnotation' in node &&
@@ -27,7 +23,7 @@ function getTypeAnnotation(node: BabelCore.types.Node) {
27
23
28
24
export default ( {
29
25
types : t ,
30
- } : typeof BabelCore ) : BabelCore . PluginObj < Options > => {
26
+ } : typeof BabelCore ) : BabelCore . PluginObj < SimpleTypeResolveOptions > => {
31
27
let ctx : SimpleTypeResolveContext | undefined ;
32
28
let helpers : Set < string > | undefined ;
33
29
@@ -89,7 +85,7 @@ export default ({
89
85
ctx = {
90
86
filename : filename ,
91
87
source : file . code ,
92
- options : this . compileOptions || { } ,
88
+ options : this || { } ,
93
89
ast : file . ast . program . body ,
94
90
error ( msg , node ) {
95
91
throw new Error (
@@ -115,7 +111,6 @@ export default ({
115
111
getString ( node ) {
116
112
return file . code . slice ( node . start ! , node . end ! ) ;
117
113
} ,
118
- bindingMetadata : Object . create ( null ) ,
119
114
propsTypeDecl : undefined ,
120
115
propsRuntimeDefaults : undefined ,
121
116
propsDestructuredBindings : { } ,
0 commit comments