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

Added t() to allow for simpler use of schema #2962

Merged
merged 1 commit into from
Jan 26, 2022

Conversation

mattpocock
Copy link
Contributor

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jan 25, 2022

🦋 Changeset detected

Latest commit: 3252065

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
xstate Patch

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

@ghost
Copy link

ghost commented Jan 25, 2022

CodeSee Review Map:

Review these changes using an interactive CodeSee Map

Review in an interactive map

View more CodeSee Maps

Legend

CodeSee Map Legend

@@ -1,3 +1,4 @@
export function createSchema<T>(schema?: any): T {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export function createSchema<T>(schema?: any): T {
/**
* @deprecated Use `t<SomeType>()` instead.
**/
export function createSchema<T>(schema?: any): T {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work as intended? Since t is an alias it might rely on the createSchema TSDocs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe move the function definition to t instead?

This is nit-level but useful for folks using createSchema; can be done in a separate PR by the way

@davidkpiano davidkpiano merged commit 7aa7204 into main Jan 26, 2022
@davidkpiano davidkpiano deleted the matt/added-t-to-allow-for-simpler-use-of-schema branch January 26, 2022 01:12
@github-actions github-actions bot mentioned this pull request Jan 26, 2022
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