diff --git a/packages/reactivity/src/collectionHandlers.ts b/packages/reactivity/src/collectionHandlers.ts index 09365f96021..bea173cd8a6 100644 --- a/packages/reactivity/src/collectionHandlers.ts +++ b/packages/reactivity/src/collectionHandlers.ts @@ -9,7 +9,7 @@ type IterableCollections = Map | Set type WeakCollections = WeakMap | WeakSet type MapTypes = Map | WeakMap type SetTypes = Set | WeakSet - +type instrumentationsType = Record const toShallow = (value: T): T => value const getProto = (v: T): any => @@ -228,7 +228,7 @@ function createReadonlyMethod(type: TriggerOpTypes): Function { } function createInstrumentations() { - const mutableInstrumentations: Record = { + const mutableInstrumentations: instrumentationsType = { get(this: MapTypes, key: unknown) { return get(this, key) }, @@ -243,7 +243,7 @@ function createInstrumentations() { forEach: createForEach(false, false) } - const shallowInstrumentations: Record = { + const shallowInstrumentations: instrumentationsType = { get(this: MapTypes, key: unknown) { return get(this, key, false, true) }, @@ -258,7 +258,7 @@ function createInstrumentations() { forEach: createForEach(false, true) } - const readonlyInstrumentations: Record = { + const readonlyInstrumentations: instrumentationsType = { get(this: MapTypes, key: unknown) { return get(this, key, true) }, @@ -275,7 +275,7 @@ function createInstrumentations() { forEach: createForEach(true, false) } - const shallowReadonlyInstrumentations: Record = { + const shallowReadonlyInstrumentations: instrumentationsType = { get(this: MapTypes, key: unknown) { return get(this, key, true, true) },