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

Make uniforms context an interface instead of a type #1211

Open
wadamek65 opened this issue Jan 30, 2023 · 1 comment
Open

Make uniforms context an interface instead of a type #1211

wadamek65 opened this issue Jan 30, 2023 · 1 comment
Labels
Area: Core Affects the uniforms package Type: Feature New features and feature requests

Comments

@wadamek65
Copy link
Contributor

It would be best to convert this type into an interface so that it can be extended as needed when using uniforms.

Our use case is that we have a custom bridge that implements additional custom methods. We then use this bridge (schema) by using the useForm hook within a field and calling the method within that component. Now, since the schema returned is of default type Bridge, this method does not exist in types and produces a type error. The current workaround is to either ignore the error or cast the type.

@wadamek65 wadamek65 added Type: Feature New features and feature requests Area: Core Affects the uniforms package labels Jan 30, 2023
@github-project-automation github-project-automation bot moved this to Needs triage in Open Source Jan 30, 2023
@wadamek65 wadamek65 moved this from Needs triage to To do in Open Source Jan 30, 2023
@wadamek65 wadamek65 moved this from To do to Needs triage in Open Source Jan 30, 2023
@radekmie
Copy link
Contributor

radekmie commented Feb 3, 2023

I looked into it, and I don't think it'll cover your need - you won't be able to override this property anyway (TypeScript playground). Or maybe I don't see something?

@radekmie radekmie moved this from Needs triage to In progress in Open Source Mar 26, 2023
@radekmie radekmie moved this from In progress to Needs triage in Open Source Mar 26, 2023
@radekmie radekmie moved this from Needs triage to Concept in Open Source Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Core Affects the uniforms package Type: Feature New features and feature requests
Projects
Status: Concept
Development

No branches or pull requests

2 participants