-
-
Notifications
You must be signed in to change notification settings - Fork 230
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
add Serializable docs #3148
Merged
Merged
add Serializable docs #3148
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🦋 Changeset detectedLatest commit: 1c5c649 The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Merged
suddenlyGiovanni
added a commit
to suddenlyGiovanni/resume
that referenced
this pull request
Sep 3, 2024
- [#3192](Effect-TS/effect#3192) [`5d5cc6c`](Effect-TS/effect@5d5cc6c) Thanks @KhraksMamtsov! - Support `Capitalize` `Uncapitalize` filters and schemas - [#3148](Effect-TS/effect#3148) [`359ff8a`](Effect-TS/effect@359ff8a) Thanks @gcanti! - add `Serializable.Serializable.Type` and `Serializable.Serializable.Encoded` - [#3198](Effect-TS/effect#3198) [`f7534b9`](Effect-TS/effect@f7534b9) Thanks @gcanti! - Add `toString` to `AST.PropertySignature` and `AST.IndexSignature` and fix type display for IndexSignature. **Before the Change** Previously, when a type mismatch occurred in `Schema.decodeUnknownSync`, the error message displayed for `IndexSignature` was not accurately representing the type used. For example: ```typescript import { Schema } from "@effect/schema" const schema = Schema.Record(Schema.Char, Schema.String) Schema.decodeUnknownSync(schema)({ a: 1 }) /* throws ParseError: { readonly [x: string]: string } └─ ["a"] └─ Expected string, actual 1 */ ``` This output incorrectly indicated `[x: string]` when the actual index type was `Char`. **After the Change** The `toString` implementation now correctly reflects the type used in `IndexSignature`, providing more accurate and informative error messages: ```ts import { Schema } from "@effect/schema" const schema = Schema.Record(Schema.Char, Schema.String) Schema.decodeUnknownSync(schema)({ a: 1 }) /* throws ParseError: { readonly [x: Char]: string } └─ ["a"] └─ Expected string, actual 1 */ ``` The updated output now correctly displays `{ readonly [x: Char]: string }`, aligning the error messages with the actual data types used in the schema. - Updated dependencies [[`a435e0f`](Effect-TS/effect@a435e0f), [`b5554db`](Effect-TS/effect@b5554db), [`a9c4fb3`](Effect-TS/effect@a9c4fb3)]: - effect@3.4.8 Signed-off-by: Giovanni Ravalico <15946771+suddenlyGiovanni@users.noreply.github.com>
suddenlyGiovanni
added a commit
to suddenlyGiovanni/resume
that referenced
this pull request
Sep 3, 2024
- [#3192](Effect-TS/effect#3192) [`5d5cc6c`](Effect-TS/effect@5d5cc6c) - Support `Capitalize` `Uncapitalize` filters and schemas - [#3148](Effect-TS/effect#3148) [`359ff8a`](Effect-TS/effect@359ff8a) - add `Serializable.Serializable.Type` and `Serializable.Serializable.Encoded` - [#3198](Effect-TS/effect#3198) [`f7534b9`](Effect-TS/effect@f7534b9) - Add `toString` to `AST.PropertySignature` and `AST.IndexSignature` and fix type display for IndexSignature. **Before the Change** Previously, when a type mismatch occurred in `Schema.decodeUnknownSync`, the error message displayed for `IndexSignature` was not accurately representing the type used. For example: ```typescript import { Schema } from "@effect/schema" const schema = Schema.Record(Schema.Char, Schema.String) Schema.decodeUnknownSync(schema)({ a: 1 }) /* throws ParseError: { readonly [x: string]: string } └─ ["a"] └─ Expected string, actual 1 */ ``` This output incorrectly indicated `[x: string]` when the actual index type was `Char`. **After the Change** The `toString` implementation now correctly reflects the type used in `IndexSignature`, providing more accurate and informative error messages: ```ts import { Schema } from "@effect/schema" const schema = Schema.Record(Schema.Char, Schema.String) Schema.decodeUnknownSync(schema)({ a: 1 }) /* throws ParseError: { readonly [x: Char]: string } └─ ["a"] └─ Expected string, actual 1 */ ``` The updated output now correctly displays `{ readonly [x: Char]: string }`, aligning the error messages with the actual data types used in the schema. - Updated dependencies [[`a435e0f`](Effect-TS/effect@a435e0f), [`b5554db`](Effect-TS/effect@b5554db), [`a9c4fb3`](Effect-TS/effect@a9c4fb3)]: - effect@3.4.8 Signed-off-by: Giovanni Ravalico <15946771+suddenlyGiovanni@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.