We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9558c21 commit 613aeadCopy full SHA for 613aead
tests/cases/compiler/recursion.ts
@@ -13,3 +13,27 @@ let o = {
13
let x = o.m() // x: number
14
let y = o.m2() // y: any
15
let p = o.p // p: number
16
+
17
+type Propertise<T> = { [K in keyof T]: T[K] };
18
+type Vue<T extends { data, methods, properties }> = T['data'] & T['methods'] & Propertise<T['properties']>;
19
20
+let options = {
21
+ data: {
22
+ a: 12,
23
+ },
24
+ methods: {
25
+ m1(this: Vue<typeof options>) {
26
+ this.a;
27
+ this.m2();
28
+ return this.a + this.p.length;
29
30
+ m2(this: Vue<typeof options>) {
31
+ return this.m1();
32
+ }
33
34
+ properties: {
35
+ p() { return 'foo' }
36
37
+}
38
39
+let app: Vue<typeof options>;
0 commit comments