-
Notifications
You must be signed in to change notification settings - Fork 0
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
Derive props from $
type
#1
Comments
I believe the problem is that type IntrinsicElement = keyof JSX.IntrinsicElements;
interface Primitive<T extends IntrinsicElement> extends JSX.IntrinsicElements[T] {
$: T
}
declare global {
namespace JSX {
interface IntrinsicElements<T extends IntrinsicElement> {
flex: Primitive<T>
}
}
} Buut, adding a generic to Maybe microsoft/TypeScript#14729 will help? |
For now, I'll leave |
I was excited to see this new feature in TS, but it is not what I need. I should try to PR Typescript to add a root level generic to |
I spent a few hours trying to figure this out, but without some way of defaulting a
generic
for an interface, I don't know if this is possible. This is possible for a function, but I wasn't able to get it for an interface (which is what we need when adding our primitives to theIntrinsicElements
interface.The text was updated successfully, but these errors were encountered: