We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
In typescript 4.8+ generics no longer assignable to {}, those changes cause following error
to fix this, generics in styletron must extends {}
extends {}
Index: ./node_modules/styletron-react/lib/types.d.ts --- ./node_modules/styletron-react/lib/types.d.ts +++ ./node_modules/styletron-react/lib/types.d.ts @@ -67,7 +67,7 @@ displayName?: string; } export declare type StyledFn = { - <T extends React.ElementType, Props>(component: T, style: StyleObject | ((props: Props) => StyleObject)): StyletronComponent<T, Props>; + <T extends React.ElementType, Props extends {}>(component: T, style: StyleObject | ((props: Props) => StyleObject)): StyletronComponent<T, Props>; }; export declare type WithStyleFn = { <Base extends StyletronComponent<any, any>, Props = {}>(component: Base, style: StyleObject | ((props: Props) => StyleObject)): Base extends StyletronComponent<infer D, infer P> ? StyletronComponent<D, P & Props> : never;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
In typescript 4.8+ generics no longer assignable to {}, those changes cause following error
to fix this, generics in styletron must
extends {}
The text was updated successfully, but these errors were encountered: