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(typescript-effect-schema): support effect@^3.10.0 #2659

Closed
wants to merge 1 commit into from

Conversation

successkrisz
Copy link

Context (-, typescript-effect-schema)

Input Format: -
Output Language: typescript-effect-schema

Description

With the effect v3.10.0 release, effect-schema became a stable version within the core effect package and @effect/schema should not be used anymore as newer effect versions are incompatible with it.

It already had the issue with the Schema.Record API moving from Schema.Record(key, value) to Schema.Record({key, value}) this PR addresses that one as well

Current Behaviour / Output

quicktype currently supports the usage of @effect/[email protected] to generate the schemas which is deprecated as now effect/schema is part of the core effect library.

import * as S from "@effect/schema/Schema"
// ...
S.Record(S.String, S.Number)

Proposed Behaviour / Output

import {Schema as S} from "effect"
// only other api change is how records are done:
S.Record({ key: S.String, value: S.Number })

Solution

Changed import to use effect instead of @effect/schema for the imports and fixed the behaviour of Records

Alternatives

No Alternatives

Context

@successkrisz
Copy link
Author

Cancelling in favour of: #2646

@successkrisz
Copy link
Author

#2646

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.

1 participant