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
A user on the forums asked a question about how to create a subclassable base Component that takes a generic parameter that is used to inform the type of a Ref value. In diving into a potential solution I discovered that the type definitions for getByRef() are not allowing for a genericized Ref value type, while the definitions for tag() are allowing it just fine.
Argument of type 'string' is not assignable to parameter of type 'keyof TemplateSpecRefs<IPageTemplateSpec<T>>'.
Type '"Content"' is not assignable to type '"Header" | (TransformPossibleElement<P, IPageTemplateSpec<T>[P], never> extends never ? never : P) | ((T extends Constructor<...> ? InstanceType<...> : Element<...>) extends never ? never : "Content")'.ts(2345)
A user on the forums asked a question about how to create a subclassable base Component that takes a generic parameter that is used to inform the type of a Ref value. In diving into a potential solution I discovered that the type definitions for
getByRef()
are not allowing for a genericized Ref value type, while the definitions fortag()
are allowing it just fine.Example code:
The error is:
Example Repo: https://github.com/frank-weindel/com.domain.app.LngForum546Subclassable
The text was updated successfully, but these errors were encountered: