Skip to content

Commit

Permalink
fix(types): use AnyObject insteads of any (#742)
Browse files Browse the repository at this point in the history
Co-authored-by: webfansplz <>
  • Loading branch information
webfansplz committed Jul 2, 2021
1 parent 0503b68 commit efb4195
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/reactivity/del.ts
@@ -1,10 +1,11 @@
import { AnyObject } from '../types/basic'
import { getVueConstructor } from '../runtimeContext'
import { hasOwn, isPrimitive, isUndef, isValidArrayIndex } from '../utils'

/**
* Delete a property and trigger change if necessary.
*/
export function del(target: any, key: any) {
export function del(target: AnyObject, key: any) {
const Vue = getVueConstructor()
const { warn } = Vue.util

Expand Down
3 changes: 2 additions & 1 deletion src/reactivity/set.ts
@@ -1,3 +1,4 @@
import { AnyObject } from '../types/basic'
import { getVueConstructor } from '../runtimeContext'
import { isArray, isPrimitive, isUndef, isValidArrayIndex } from '../utils'
import { defineAccessControl } from './reactive'
Expand All @@ -7,7 +8,7 @@ import { defineAccessControl } from './reactive'
* notification and intercept it's subsequent access if the property doesn't
* already exist.
*/
export function set<T>(target: any, key: any, val: T): T {
export function set<T>(target: AnyObject, key: any, val: T): T {
const Vue = getVueConstructor()
const { warn, defineReactive } = Vue.util
if (__DEV__ && (isUndef(target) || isPrimitive(target))) {
Expand Down

0 comments on commit efb4195

Please sign in to comment.