@@ -704,7 +704,7 @@ exports[`SFC compile <script setup> with TypeScript defineEmits w/ type (exporte
704
704
export interface Emits { (e : ' foo' | ' bar' ): void }
705
705
706
706
export default /*#__PURE__*/_defineComponent({
707
- emits : [\\" foo\\ " , \\" bar\\ " ] as unknown as undefined ,
707
+ emits : [\\" foo\\ " , \\" bar\\ " ],
708
708
setup (__props , { expose , emit }: { emit: ({ (e : ' foo' | ' bar' ): void }), expose: any , slots: any , attrs: any }) {
709
709
expose()
710
710
@@ -721,7 +721,7 @@ exports[`SFC compile <script setup> with TypeScript defineEmits w/ type (exporte
721
721
export type Emits = { (e : ' foo' | ' bar' ): void }
722
722
723
723
export default /*#__PURE__*/_defineComponent({
724
- emits : [\\" foo\\ " , \\" bar\\ " ] as unknown as undefined ,
724
+ emits : [\\" foo\\ " , \\" bar\\ " ],
725
725
setup (__props , { expose , emit }: { emit: ({ (e : ' foo' | ' bar' ): void }), expose: any , slots: any , attrs: any }) {
726
726
expose()
727
727
@@ -738,7 +738,7 @@ exports[`SFC compile <script setup> with TypeScript defineEmits w/ type (interfa
738
738
interface Emits { (e : ' foo' | ' bar' ): void }
739
739
740
740
export default /*#__PURE__*/_defineComponent({
741
- emits : [\\" foo\\ " , \\" bar\\ " ] as unknown as undefined ,
741
+ emits : [\\" foo\\ " , \\" bar\\ " ],
742
742
setup (__props , { expose , emit }: { emit: ({ (e : ' foo' | ' bar' ): void }), expose: any , slots: any , attrs: any }) {
743
743
expose()
744
744
@@ -755,7 +755,7 @@ exports[`SFC compile <script setup> with TypeScript defineEmits w/ type (referen
755
755
export type Emits = (e: 'foo' | 'bar') => void
756
756
757
757
export default /*#__PURE__*/_defineComponent({
758
- emits : [\\" foo\\ " , \\" bar\\ " ] as unknown as undefined ,
758
+ emits : [\\" foo\\ " , \\" bar\\ " ],
759
759
setup (__props , { expose , emit }: { emit: ((e : ' foo' | ' bar' ) => void ), expose: any , slots: any , attrs: any }) {
760
760
expose()
761
761
@@ -772,7 +772,7 @@ exports[`SFC compile <script setup> with TypeScript defineEmits w/ type (referen
772
772
type Emits = (e: 'foo' | 'bar') => void
773
773
774
774
export default /*#__PURE__*/_defineComponent({
775
- emits : [\\" foo\\ " , \\" bar\\ " ] as unknown as undefined ,
775
+ emits : [\\" foo\\ " , \\" bar\\ " ],
776
776
setup (__props , { expose , emit }: { emit: ((e : ' foo' | ' bar' ) => void ), expose: any , slots: any , attrs: any }) {
777
777
expose()
778
778
@@ -789,7 +789,7 @@ exports[`SFC compile <script setup> with TypeScript defineEmits w/ type (type al
789
789
type Emits = { (e : ' foo' | ' bar' ): void }
790
790
791
791
export default /*#__PURE__*/_defineComponent({
792
- emits : [\\" foo\\ " , \\" bar\\ " ] as unknown as undefined ,
792
+ emits : [\\" foo\\ " , \\" bar\\ " ],
793
793
setup (__props , { expose , emit }: { emit: ({ (e : ' foo' | ' bar' ): void }), expose: any , slots: any , attrs: any }) {
794
794
expose()
795
795
@@ -805,7 +805,7 @@ exports[`SFC compile <script setup> with TypeScript defineEmits w/ type (type li
805
805
"import { defineComponent as _defineComponent } from 'vue'
806
806
807
807
export default /*#__PURE__*/_defineComponent({
808
- emits : [\\" foo\\ " , \\" bar\\ " , \\" baz\\ " ] as unknown as undefined ,
808
+ emits : [\\" foo\\ " , \\" bar\\ " , \\" baz\\ " ],
809
809
setup (__props , { expose , emit }: { emit: ({(e : ' foo' | ' bar' ): void ; (e : ' baz' , id : number ): void ;}), expose: any , slots: any , attrs: any }) {
810
810
expose()
811
811
@@ -821,7 +821,7 @@ exports[`SFC compile <script setup> with TypeScript defineEmits w/ type 1`] = `
821
821
"import { defineComponent as _defineComponent } from 'vue'
822
822
823
823
export default /*#__PURE__*/_defineComponent({
824
- emits : [\\" foo\\ " , \\" bar\\ " ] as unknown as undefined ,
824
+ emits : [\\" foo\\ " , \\" bar\\ " ],
825
825
setup (__props , { expose , emit }: { emit: ((e : ' foo' | ' bar' ) => void ), expose: any , slots: any , attrs: any }) {
826
826
expose()
827
827
@@ -840,8 +840,8 @@ export interface Props { x?: number }
840
840
export default /*#__PURE__*/_defineComponent({
841
841
props : {
842
842
x: { type: Number , required: false }
843
- } as unknown as undefined ,
844
- setup (__props : { x?: number } , { expose }) {
843
+ },
844
+ setup (__props : any , { expose }) {
845
845
expose()
846
846
847
847
@@ -859,8 +859,8 @@ export type Props = { x?: number }
859
859
export default /*#__PURE__*/_defineComponent({
860
860
props : {
861
861
x: { type: Number , required: false }
862
- } as unknown as undefined ,
863
- setup (__props : { x?: number } , { expose }) {
862
+ },
863
+ setup (__props : any , { expose }) {
864
864
expose()
865
865
866
866
@@ -878,8 +878,8 @@ interface Props { x?: number }
878
878
export default /*#__PURE__*/_defineComponent({
879
879
props : {
880
880
x: { type: Number , required: false }
881
- } as unknown as undefined ,
882
- setup (__props : { x?: number } , { expose }) {
881
+ },
882
+ setup (__props : any , { expose }) {
883
883
expose()
884
884
885
885
@@ -923,34 +923,8 @@ export default /*#__PURE__*/_defineComponent({
923
923
literalUnionMixed: { type: [String , Number , Boolean ], required: true },
924
924
intersection: { type: Object , required: true },
925
925
foo: { type: [Function , null ], required: true }
926
- } as unknown as undefined ,
927
- setup (__props : {
928
- string: string
929
- number : number
930
- boolean : boolean
931
- object : object
932
- objectLiteral : { a: number }
933
- fn : (n : number ) => void
934
- functionRef : Function
935
- objectRef : Object
936
- array : string []
937
- arrayRef : Array <any >
938
- tuple: [number, number]
939
- set: Set<string >
940
- literal: 'foo'
941
- optional?: any
942
- recordRef: Record<string, null>
943
- interface: Test
944
- alias: Alias
945
- method(): void
946
-
947
- union: string | number
948
- literalUnion: 'foo' | 'bar'
949
- literalUnionNumber: 1 | 2 | 3 | 4 | 5
950
- literalUnionMixed: 'foo' | 1 | boolean
951
- intersection: Test & { }
952
- foo: ((item: any) => boolean) | null
953
- }, { expose } ) {
926
+ },
927
+ setup (__props : any , { expose }) {
954
928
expose()
955
929
956
930
@@ -968,8 +942,8 @@ type Props = { x?: number }
968
942
export default /*#__PURE__*/_defineComponent({
969
943
props : {
970
944
x: { type: Number , required: false }
971
- } as unknown as undefined ,
972
- setup (__props : { x?: number } , { expose }) {
945
+ },
946
+ setup (__props : any , { expose }) {
973
947
expose()
974
948
975
949
@@ -1039,15 +1013,15 @@ export default /*#__PURE__*/_defineComponent({
1039
1013
foo: { type: String , required: false },
1040
1014
bar: { type: Number , required: false },
1041
1015
baz: { type: Boolean , required: true }
1042
- }, { ... defaults }) as unknown as undefined ,
1043
- setup (__props : {
1016
+ }, { ... defaults }),
1017
+ setup (__props : any , { expose }) {
1018
+ expose()
1019
+
1020
+ const props = __props as {
1044
1021
foo ?: string
1045
1022
bar ?: number
1046
1023
baz : boolean
1047
- }, { expose }) {
1048
- expose()
1049
-
1050
- const props = __props
1024
+ }
1051
1025
1052
1026
1053
1027
return { props , defaults }
@@ -1065,11 +1039,11 @@ export default /*#__PURE__*/_defineComponent({
1065
1039
bar: { type: Number , required: false },
1066
1040
baz: { type: Boolean , required: true },
1067
1041
qux: { type: Function , required: false , default() { return 1 } }
1068
- } as unknown as undefined ,
1069
- setup (__props : { foo: string , bar?: number , baz: boolean , qux() : number } , { expose }) {
1042
+ },
1043
+ setup (__props : any , { expose }) {
1070
1044
expose()
1071
1045
1072
- const props = __props
1046
+ const props = __props as { foo : string , bar ?: number , baz : boolean , qux (): number }
1073
1047
1074
1048
1075
1049
return { props }
0 commit comments