You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a very, very rich set of types in Inferno and many types have similar names. This can make it hard to pick an appropriate type in application code.
It would be great if we could create a limited set of type aliases with intuitive names that can be used by application developers.
Use case:
You want to create a look up dictionary with different components that are resolved at runtime to render a list of various items
What is the correct type for the the component? Is it:
IComponent<any, any> | Function
Component | Function
Component<any> | Inferno.StatelessComponent<any>
ComponentType
So a type alias could be:
// Require a Function or Class Component where P is a required set of properties
export type InfernoComponent<P = any> = Component<P> | Inferno.StatelessComponent<P>;
This would save time, encourage type safety and make application code more readable.
The text was updated successfully, but these errors were encountered:
We have a very, very rich set of types in Inferno and many types have similar names. This can make it hard to pick an appropriate type in application code.
It would be great if we could create a limited set of type aliases with intuitive names that can be used by application developers.
Use case:
What is the correct type for the the component? Is it:
IComponent<any, any> | Function
Component | Function
Component<any> | Inferno.StatelessComponent<any>
ComponentType
So a type alias could be:
This would save time, encourage type safety and make application code more readable.
The text was updated successfully, but these errors were encountered: