chore: remove duplicated types

This commit is contained in:
Evan You 2022-05-26 02:18:33 +08:00
parent 05aaa33a45
commit 282ebb0893
2 changed files with 6 additions and 17 deletions

View File

@ -1,7 +1,6 @@
import { isRef, Ref } from './reactivity/ref'
import { ComputedRef } from './reactivity/computed'
import { isReactive, isShallow } from './reactivity/reactive'
import { TrackOpTypes, TriggerOpTypes } from './reactivity/operations'
import {
warn,
noop,
@ -14,7 +13,11 @@ import {
} from 'core/util'
import { currentInstance } from './currentInstance'
import { traverse } from 'core/observer/traverse'
import { EffectScheduler, ReactiveEffect } from './reactivity/effect'
import {
EffectScheduler,
ReactiveEffect,
DebuggerEvent
} from './reactivity/effect'
const WATCHER = `watcher`
const WATCHER_CB = `${WATCHER} callback`
@ -54,19 +57,6 @@ export interface DebuggerOptions {
onTrigger?: (event: DebuggerEvent) => void
}
export type DebuggerEvent = {
// TODO effect: ReactiveEffect
} & DebuggerEventExtraInfo
export type DebuggerEventExtraInfo = {
target: object
type: TrackOpTypes | TriggerOpTypes
key: any
newValue?: any
oldValue?: any
oldTarget?: Map<any, any> | Set<any>
}
export interface WatchOptions<Immediate = boolean> extends WatchOptionsBase {
immediate?: Immediate
deep?: boolean

View File

@ -47,6 +47,5 @@ export {
watch,
watchEffect,
watchPostEffect,
watchSyncEffect,
DebuggerEvent
watchSyncEffect
} from './apiWatch'