Skip to content

Commit 9bd83a5

Browse files
committed
Remove 'this' annotation from 'get' accessor
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 vuejs#800
1 parent 08bba09 commit 9bd83a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/reactivity/src/collectionHandlers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ const mutableInstrumentations: Record<string, Function> = {
176176
get(this: MapTypes, key: unknown) {
177177
return get(this, key, toReactive)
178178
},
179-
get size(this: IterableCollections) {
180-
return size(this)
179+
get size() {
180+
return size(this as unknown as IterableCollections)
181181
},
182182
has,
183183
add,

0 commit comments

Comments
 (0)