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
I'm trying to get TypeScript to be aware of the properties of a Component, but because Components' properties are static, it's not possible to create a generic Component type from those properties.
I put together a TypedComponent definition that gets what I'm after, but it's pretty messy and I'm not sure it's an accepted pattern in TypeScript.
Let me know your thoughts, I'm going to continue developing with it and see how it feels, but so far it's been a useful type.
I'm trying to get TypeScript to be aware of the
properties
of a Component, but because Components' properties arestatic
, it's not possible to create a generic Component type from those properties.I put together a
TypedComponent
definition that gets what I'm after, but it's pretty messy and I'm not sure it's an accepted pattern in TypeScript.Let me know your thoughts, I'm going to continue developing with it and see how it feels, but so far it's been a useful type.
Then in my component definition, then in a system:
The text was updated successfully, but these errors were encountered: