test(types): test dts for Options API method return type inference (#1708)
This commit is contained in:
parent
07ece2e926
commit
5681fdb211
@ -297,6 +297,9 @@ describe('type inference w/ options API', () => {
|
||||
expectType<number>(this.c)
|
||||
// computed
|
||||
expectType<number>(this.d)
|
||||
},
|
||||
returnSomething() {
|
||||
return this.a
|
||||
}
|
||||
},
|
||||
render() {
|
||||
@ -308,6 +311,8 @@ describe('type inference w/ options API', () => {
|
||||
expectType<number>(this.c)
|
||||
// computed
|
||||
expectType<number>(this.d)
|
||||
// method
|
||||
expectType<() => number | undefined>(this.returnSomething)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user