From 16f9e63951fe5ab9a8b1b5c85f99f0e28c6c7d3d Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 5 Mar 2020 16:57:52 -0600 Subject: [PATCH] types: remove 'this' annotation from 'get' accessor (#801) The next version of Typescript disallows 'this' parameter annotations on accessors, which causes vue-next to fail to compile. This PR removes the annotation and adds a cast instead. Fixes #800 --- packages/reactivity/src/collectionHandlers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/reactivity/src/collectionHandlers.ts b/packages/reactivity/src/collectionHandlers.ts index af4ca05d..095537cc 100644 --- a/packages/reactivity/src/collectionHandlers.ts +++ b/packages/reactivity/src/collectionHandlers.ts @@ -176,8 +176,8 @@ const mutableInstrumentations: Record = { get(this: MapTypes, key: unknown) { return get(this, key, toReactive) }, - get size(this: IterableCollections) { - return size(this) + get size() { + return size(this as unknown as IterableCollections) }, has, add,