Closed seanpianka closed 4 months ago
Hey, thanks for the PR! Please check out the Contributing guide for instructions on how to update the README.
Edit: I see the link in the PR template is incorrectly pointing at the CHANGELOG file instead of CONTRIBUTING, sorry about that, it's already been fixed, both in the template and in this PR's description
I'm a bit confused by rust-decimal
in general. Their usage of features seems a bit odd to me (though we're abusing them similarly I guess).
If we want support rust-decimal
going forward, I think we need to seamlessly support all these modes - and I'm not sure that's easily possible.
Re-exposing all features of rust_decimal
, for example, doesn't seem great.
rust_decimal
already has feature gates for a wide variety of libraries, so maybe it'd be worth a shot to open a PR there. In the rust_decimal
crate, this could be implemented nicely using #[cfg(feature = "..")]
annotations.
Closing this for now. I think we established that we can't support this properly.
Either rust_decimal
implements TS
behind a feature-flag, or users will have to use #[ts(as = ..)]
or #[ts(type = "..")]
.
Goal
Provide a serde-based implementation of TS for rust_decimal::Decimal Closes #272
Changes
Derive an implementation for rust_decimal::Decimal using feature flag serde-with-str.
Checklist