Skip to content

Commit 16f9e63

Browse files
authored
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
1 parent 08bba09 commit 16f9e63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/reactivity/src/collectionHandlers.ts

+2-2
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)