Skip to content

Commit 90ee362

Browse files
yyx990803gulewei
authored andcommitted
fix: mixin -> mixins
1 parent 30b3eae commit 90ee362

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

types/options.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export type ThisTypedComponentOptionsWithArrayProps<
106106
Record<PropNames, any>,
107107
SetupBindings
108108
> & {
109-
mixin?: Mixin[]
109+
mixins?: Mixin[]
110110
extends?: Extends
111111
} & ThisType<
112112
CombinedVueInstance<
@@ -143,7 +143,7 @@ export type ThisTypedComponentOptionsWithRecordProps<
143143
Props,
144144
SetupBindings
145145
> & {
146-
mixin?: Mixin[]
146+
mixins?: Mixin[]
147147
extends?: Extends
148148
} & ThisType<
149149
CombinedVueInstance<

types/test/vue-test.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,21 @@ const ComponentWithStyleInVNodeData = Vue.extend({
249249

250250
// infer mixin type with new Vue() #12730
251251
new Vue({
252-
mixin: [
252+
mixins: [
253+
{
254+
data() {
255+
return {
256+
foo: 123
257+
}
258+
}
259+
},
253260
{
254261
methods: {
255-
hello() {}
262+
hello(n: number) {}
256263
}
257264
}
258265
],
259266
created() {
260-
this.hello()
267+
this.hello(this.foo)
261268
}
262269
})

0 commit comments

Comments
 (0)