File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed
packages/complex-types/test Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 5
5
>
6
6
import type { SomeInterface } from " ./basic-ts" ;
7
7
8
+ enum SomeEnum {
9
+ One = " one" ,
10
+ Two = " two" ,
11
+ Three = 3 ,
12
+ }
13
+
8
14
defineProps<
9
15
{
10
16
string: string;
@@ -21,6 +27,7 @@ defineProps<
21
27
null: string | null ;
22
28
symbol: symbol;
23
29
' quotes"' : string;
30
+ enum: SomeEnum;
24
31
} & SomeInterface & {
25
32
[MappedString in " 1-1" | " 1-2" ]: ` ${ MappedString} MappedType` ;
26
33
} & {
Original file line number Diff line number Diff line change @@ -91,6 +91,12 @@ exports[`fixtures compiled > __fixtures__/defineProps/basic.vue 1`] = `
91
91
import { defineComponent } from 'vue';
92
92
import _export_sfc from '[NULL]/plugin-vue/export-helper';
93
93
94
+ var SomeEnum = /* @__PURE__ */ function(SomeEnum) {
95
+ SomeEnum [" One" ] = " one" ;
96
+ SomeEnum [" Two" ] = " two" ;
97
+ SomeEnum [SomeEnum [" Three" ] = 3 ] = " Three" ;
98
+ return SomeEnum ;
99
+ } (SomeEnum || { } );
94
100
var _sfc_main = /* @__PURE__ */ defineComponent({
95
101
__name : " basic" ,
96
102
props : {
@@ -139,6 +145,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
139
145
type: String ,
140
146
required: true
141
147
},
148
+ enum: {
149
+ type: [String , Number ],
150
+ required: true
151
+ },
142
152
emptyInterface: {
143
153
type: Object ,
144
154
required: true
@@ -174,7 +184,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
174
184
},
175
185
setup (__props , { expose: __expose }) {
176
186
__expose();
177
- const __returned__ = {};
187
+ const __returned__ = { SomeEnum };
178
188
Object .defineProperty (__returned__ , " __isScriptSetup" , {
179
189
enumerable: false ,
180
190
value: true
Original file line number Diff line number Diff line change @@ -41,6 +41,12 @@ exports[`fixtures > __fixtures__/defineProps/basic.vue 1`] = `
41
41
>
42
42
import type { SomeInterface } from "./basic-ts";
43
43
44
+ enum SomeEnum {
45
+ One = " one" ,
46
+ Two = " two" ,
47
+ Three = 3 ,
48
+ }
49
+
44
50
defineProps<
45
51
{
46
52
" string" : string ,
@@ -55,6 +61,7 @@ defineProps<
55
61
" null" : null | string ,
56
62
" symbol" : symbol ,
57
63
" quotes\\ " " : string,
64
+ " enum" : string | number ,
58
65
} & {
59
66
" emptyInterface" : object ,
60
67
" conditionalNumber" : number ,
You can’t perform that action at this time.
0 commit comments