File tree 1 file changed +16
-8
lines changed
1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -76,28 +76,36 @@ Vue.component('union-prop', {
76
76
complexUnion : { type : [ User , Number ] as PropType < User | number > } ,
77
77
kittyUser : Object as PropType < ICat & IUser > ,
78
78
callback : Function as PropType < ConfirmCallback > ,
79
- mixed : [ RegExp , Array ] ,
80
- object : [ Cat , User ] ,
81
- primitive : [ String , Number ] ,
82
- regex : RegExp ,
83
79
union : [ User , Number ] as PropType < User | number >
84
80
} ,
85
81
data ( ) {
86
82
this . cat ;
87
83
this . complexUnion ;
88
84
this . kittyUser ;
89
85
this . callback ( true ) ;
90
- this . mixed ;
91
- this . object ;
92
- this . primitive ;
93
- this . regex . compile ;
94
86
this . union ;
95
87
return {
96
88
fixedSize : this . union ,
97
89
}
98
90
}
99
91
} ) ;
100
92
93
+ // stopped working since TS 3.4
94
+ // Vue.component('union-prop-with-no-casting', {
95
+ // props: {
96
+ // mixed: [RegExp, Array],
97
+ // object: [Cat, User],
98
+ // primitive: [String, Number],
99
+ // regex: RegExp
100
+ // },
101
+ // data() {
102
+ // this.mixed;
103
+ // this.object;
104
+ // this.primitive;
105
+ // this.regex.compile;
106
+ // }
107
+ // })
108
+
101
109
Vue . component ( 'prop-with-primitive-default' , {
102
110
props : {
103
111
id : {
You can’t perform that action at this time.
0 commit comments