Skip to content

Add structuredClone support #224

@SmileSB1O1

Description

@SmileSB1O1

Decimal.js seems to not support structuredClone, this method will throw DataCloneError because of decimal instance contains a function(constructor ) due to this line code:
https://github.com/MikeMcl/decimal.js/blob/master/decimal.js#L4294

xxxx
// Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor
// which points to Object.
x.constructor = Decimal;
xxxx

Any plans to support it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions