Skip to content

Commit

Permalink
refactor(abstract-utxo): improve toPlainObject signature
Browse files Browse the repository at this point in the history
Make the `opts` and `path` arguments optional in the `toPlainObject` function.

Issue: BTC-1450
  • Loading branch information
OttoAllmendinger committed Dec 16, 2024
1 parent 35fdca6 commit b658ab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/abstract-utxo/test/core/toPlainObject.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function toPlainObjectFromPropertyDescriptors(v: unknown, opts: ToPlainObjectOpt
);
}

export function toPlainObject(v: unknown, opts: ToPlainObjectOpts, path: PathElement[]): unknown {
export function toPlainObject(v: unknown, opts: ToPlainObjectOpts = {}, path: PathElement[] = []): unknown {
if (opts.apply) {
const result = opts.apply(v, path);
if (result !== undefined) {
Expand Down

0 comments on commit b658ab5

Please sign in to comment.