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

feat: move autoCast getters to separate functions #103

Merged
merged 4 commits into from
Oct 23, 2024

Conversation

pavadeli
Copy link
Member

Every type used to have a .autoCast and .autoCastAll getter that returns a clone of the type with autocast parsers added. This PR changes that to be separate functions with the same name. This helps with future changes, because maintaining getters that return the this types is becoming increasingly hard.

BREAKING CHANGE: The getters .autoCast and .autoCastAll are removed and moved to separately exported functions.

@pavadeli pavadeli enabled auto-merge (rebase) October 21, 2024 17:32
src/utils/print-utils.ts Show resolved Hide resolved
src/utils/print-utils.test.ts Outdated Show resolved Hide resolved
@njirem njirem assigned pavadeli and unassigned njirem Oct 23, 2024
Every type used to have a `.autoCast` and `.autoCastAll` getter that returns a clone of the type with autocast parsers added. This PR changes that to be separate functions with the same name. This helps with future changes, because maintaining getters that return the `this` types is becoming increasingly hard.

BREAKING CHANGE: The getters `.autoCast` and `.autoCastAll` are removed and moved to separately exported functions.
BREAKING CHANGE: The `type`, `input` and `details` properties of `ValidationError` used to be writable, they are now marked as readonly.
@pavadeli pavadeli force-pushed the move-autoCast-to-separate-function branch from 1233597 to b39ed0f Compare October 23, 2024 12:23
@pavadeli pavadeli merged commit 8bd4908 into next Oct 23, 2024
4 checks passed
@pavadeli pavadeli deleted the move-autoCast-to-separate-function branch October 23, 2024 14:40
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

Successfully merging this pull request may close these issues.

2 participants