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
@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?

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