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!)
|
||||
activeEffect!.deps.push(dep)
|
||||
if (__DEV__ && activeEffect!.onTrack) {
|
||||
activeEffect!.onTrack(
|
||||
Object.assign(
|
||||
{
|
||||
effect: activeEffect!
|
||||
},
|
||||
debuggerEventExtraInfo
|
||||
)
|
||||
)
|
||||
activeEffect!.onTrack({
|
||||
effect: activeEffect!,
|
||||
...debuggerEventExtraInfo!
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -179,7 +179,6 @@ export function createAppAPI<HostElement>(
|
||||
hydrate?: RootHydrateFunction
|
||||
): CreateAppFunction<HostElement> {
|
||||
return function createApp(rootComponent, rootProps = null) {
|
||||
|
||||
if (!isFunction(rootComponent)) {
|
||||
rootComponent = { ...rootComponent }
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ export function watchPostEffect(
|
||||
effect,
|
||||
null,
|
||||
(__DEV__
|
||||
? Object.assign(options || {}, { flush: 'post' })
|
||||
? { ...options, flush: 'post' }
|
||||
: { flush: 'post' }) as WatchOptionsBase
|
||||
)
|
||||
}
|
||||
@ -105,7 +105,7 @@ export function watchSyncEffect(
|
||||
effect,
|
||||
null,
|
||||
(__DEV__
|
||||
? Object.assign(options || {}, { flush: 'sync' })
|
||||
? { ...options, flush: 'sync' }
|
||||
: { flush: 'sync' }) as WatchOptionsBase
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user