Skip to content

Commit efb4195

Browse files
authored
fix(types): use AnyObject insteads of any (#742)
Co-authored-by: webfansplz <>
1 parent 0503b68 commit efb4195

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/reactivity/del.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import { AnyObject } from '../types/basic'
12
import { getVueConstructor } from '../runtimeContext'
23
import { hasOwn, isPrimitive, isUndef, isValidArrayIndex } from '../utils'
34

45
/**
56
* Delete a property and trigger change if necessary.
67
*/
7-
export function del(target: any, key: any) {
8+
export function del(target: AnyObject, key: any) {
89
const Vue = getVueConstructor()
910
const { warn } = Vue.util
1011

src/reactivity/set.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { AnyObject } from '../types/basic'
12
import { getVueConstructor } from '../runtimeContext'
23
import { isArray, isPrimitive, isUndef, isValidArrayIndex } from '../utils'
34
import { defineAccessControl } from './reactive'
@@ -7,7 +8,7 @@ import { defineAccessControl } from './reactive'
78
* notification and intercept it's subsequent access if the property doesn't
89
* already exist.
910
*/
10-
export function set<T>(target: any, key: any, val: T): T {
11+
export function set<T>(target: AnyObject, key: any, val: T): T {
1112
const Vue = getVueConstructor()
1213
const { warn, defineReactive } = Vue.util
1314
if (__DEV__ && (isUndef(target) || isPrimitive(target))) {

0 commit comments

Comments
 (0)