Create react app (ejected) + TypeScript, nothing special there.
I'm trying to annotate props like this:
import { styled } from 'linaria/lib/react'
interface TitleProps {
background: string
}
export const Title = styled.div<TitleProps>`
background: ${(props) => props.background};
`
But I get an error:
interface TitleProps
Expected 0 type arguments, but got 1.ts(2558)
```
Which is weird because the typings on the [repository](https://github.com/callstack/linaria/blob/master/react.d.ts#L13) says one thing, but the typings from the distribution package at `linaria/lib/react/styled.d.ts@17` says:
```ts
declare type HtmlStyledTag<TName extends keyof JSX.IntrinsicElements> = (strings: TemplateStringsArray, ...exprs: Array<StaticPlaceholder | ((props: JSX.IntrinsicElements[TName]) => string | number)>) => StyledComponent<JSX.IntrinsicElements[TName]>;
Which means that it's not accepting any generics on this besides TName. It works if I do this:
declare type HtmlStyledTag<TName extends keyof JSX.IntrinsicElements> = <AdditionalProps>(strings: TemplateStringsArray, ...exprs: Array<StaticPlaceholder | ((props: JSX.IntrinsicElements[TName] & AdditionalProps) => string | number)>) => StyledComponent<JSX.IntrinsicElements[TName] & AdditionalProps>;
(AdditionalProps added)
But it looks like this file is being auto-generated and it looks that importing from linaria/lib/react is a workaround, right? What can be done to address this issue?
Looks like it's time to merge #389 :)
@zaguiini thank you for your report! The fix will be released with the next beta.
Most helpful comment
@zaguiini thank you for your report! The fix will be released with the next beta.