Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numeric/decimal/money should not be typed as a number #287

Closed
jgonera opened this issue Jun 22, 2021 · 2 comments
Closed

Numeric/decimal/money should not be typed as a number #287

jgonera opened this issue Jun 22, 2021 · 2 comments

Comments

@jgonera
Copy link
Contributor

jgonera commented Jun 22, 2021

Similarly to bigint, numeric/decimal/money types should not be cast as a number in TypeScript because those values can exceed Number.MAX_SAFE_INTEGER. For that reason node-postgres returns them as strings.

Could this default behavior be changed before #60 is implemented?

@jgonera
Copy link
Contributor Author

jgonera commented Jun 22, 2021

If this is just a quick change then the PR is here: #288

@jgonera jgonera changed the title Numeric/decimal typed as a number Numeric/decimal/money typed as a number Jun 22, 2021
@jgonera jgonera changed the title Numeric/decimal/money typed as a number Numeric/decimal/money should not be typed as a number Jun 24, 2021
@adelsz
Copy link
Owner

adelsz commented Jul 6, 2021

Thanks @jgonera, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants