From 5681fdb21171517464952c50faa989cf87d2fe47 Mon Sep 17 00:00:00 2001 From: Carlos Rodrigues Date: Tue, 28 Jul 2020 20:31:23 +0100 Subject: [PATCH] test(types): test dts for Options API method return type inference (#1708) --- test-dts/defineComponent.test-d.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test-dts/defineComponent.test-d.tsx b/test-dts/defineComponent.test-d.tsx index f37c0eb1..29194ca3 100644 --- a/test-dts/defineComponent.test-d.tsx +++ b/test-dts/defineComponent.test-d.tsx @@ -297,6 +297,9 @@ describe('type inference w/ options API', () => { expectType(this.c) // computed expectType(this.d) + }, + returnSomething() { + return this.a } }, render() { @@ -308,6 +311,8 @@ describe('type inference w/ options API', () => { expectType(this.c) // computed expectType(this.d) + // method + expectType<() => number | undefined>(this.returnSomething) } }) })