Skip to content

Add structuredClone support #224

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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