Comments (3)
No, no plans, and that line is essential.
Would I like to support structuredClone? Yes.
Am I going to investigate this matter right now or in the near future? Probably not.
from decimal.js.
OK, thanks.
from decimal.js.
Just landed here as structured clone is finally becoming the goto for deep cloning an object.
@WinterSmileSB101 what did you end up doing to get around this?
For now here's my painful "fix" that conforms to typing.
Here's a simple example without crazy nesting involved:
const { decimalOne, decimalTwo, ...withoutDecimals } = originalObject // originalObject satisfies SomeType
const newObjectWithoutDecimals = structuredClone(withoutDecimals)
const newObject: SomeType = {
...newObjectWithoutDecimals,
decimalOne: new Decimal(decimalOne),
decimaltwo: new Decimal(decimalTwo),
}
from decimal.js.
Related Issues (20)
- Return type of sign() is Decimal in d.ts HOT 3
- some cases normal operations still accurate than decimal.js HOT 4
- jest toEqual doesn't work HOT 1
- mathjs and decimal.js output different results HOT 1
- Allow creation without the `new` keyword HOT 4
- isPositive() should return false for zero HOT 1
- Maximum call stack size exceeded HOT 3
- Precision is lost when working with cyclic division HOT 1
- Round Half Up working as expected? HOT 1
- toFixed() is inconsistent in some way HOT 3
- Deviding by 3 HOT 3
- Create a security policy HOT 1
- Assigning to constructor at runtime
- Support for mathematical expression processing without loss of precision HOT 2
- Decimal.sum with large arrays exceeds the maximum call stack size
- Parsing from binary (Python encoding via avro) HOT 1
- question:Value of type 'typeof Decimal' is not callable. Did you mean to include 'new'? HOT 2
- Suggestion: new method `toFixedNumber(...)` that returns a number HOT 6
- Irregular length of precision for at least .sub method HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from decimal.js.