refactor: remove use of Object.assign
TS already transpiles spread to Object.assign with target:es2016
This commit is contained in:
parent
d121a9bc7e
commit
7efb9dba30
@ -237,14 +237,10 @@ export function trackEffects(
|
|||||||
dep.add(activeEffect!)
|
dep.add(activeEffect!)
|
||||||
activeEffect!.deps.push(dep)
|
activeEffect!.deps.push(dep)
|
||||||
if (__DEV__ && activeEffect!.onTrack) {
|
if (__DEV__ && activeEffect!.onTrack) {
|
||||||
activeEffect!.onTrack(
|
activeEffect!.onTrack({
|
||||||
Object.assign(
|
effect: activeEffect!,
|
||||||
{
|
...debuggerEventExtraInfo!
|
||||||
effect: activeEffect!
|
})
|
||||||
},
|
|
||||||
debuggerEventExtraInfo
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,6 @@ export function createAppAPI<HostElement>(
|
|||||||
hydrate?: RootHydrateFunction
|
hydrate?: RootHydrateFunction
|
||||||
): CreateAppFunction<HostElement> {
|
): CreateAppFunction<HostElement> {
|
||||||
return function createApp(rootComponent, rootProps = null) {
|
return function createApp(rootComponent, rootProps = null) {
|
||||||
|
|
||||||
if (!isFunction(rootComponent)) {
|
if (!isFunction(rootComponent)) {
|
||||||
rootComponent = { ...rootComponent }
|
rootComponent = { ...rootComponent }
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ export function watchPostEffect(
|
|||||||
effect,
|
effect,
|
||||||
null,
|
null,
|
||||||
(__DEV__
|
(__DEV__
|
||||||
? Object.assign(options || {}, { flush: 'post' })
|
? { ...options, flush: 'post' }
|
||||||
: { flush: 'post' }) as WatchOptionsBase
|
: { flush: 'post' }) as WatchOptionsBase
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -105,7 +105,7 @@ export function watchSyncEffect(
|
|||||||
effect,
|
effect,
|
||||||
null,
|
null,
|
||||||
(__DEV__
|
(__DEV__
|
||||||
? Object.assign(options || {}, { flush: 'sync' })
|
? { ...options, flush: 'sync' }
|
||||||
: { flush: 'sync' }) as WatchOptionsBase
|
: { flush: 'sync' }) as WatchOptionsBase
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user