Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/vitest/src/utils/serialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
function cloneByOwnProperties(value: any) {
// Clones the value's properties into a new Object. The simpler approach of
// Object.assign() won't work in the case that properties are not enumerable.
return Object.getOwnPropertyNames(value).reduce(
(clone, prop) => ({
...clone,
[prop]: value[prop],
}),
return Object.getOwnPropertyNames(value).reduce<Record<string, any>>(
(clone, prop) => {
clone[prop] = value[prop]
return clone
},
{},
)
}
Expand Down
Loading