test(types): test dts for Options API method return type inference (#1708)

This commit is contained in:
Carlos Rodrigues 2020-07-28 20:31:23 +01:00 committed by GitHub
parent 07ece2e926
commit 5681fdb211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}
})
})