Swapped Argument
The arguments are swapped and renamed.
// before
unpartial(obj, src1, src2)
// now
unpartial(base, partial)
unpartial(superBase, base, partial)In the new arrangement, code completion is better supported,
and the new argument names better reflect their meaning.
const defaultConfig = { ... } as Config
unpartial(defaultConfig, { /* code completion for `Partial<Config>` */ })Also, it now supports explicit type through generic:
unpartial<Config>(
{ /* code completion for `Config` */ },
{ /* code completion for `Partial<Config>` */ })Enjoy.