Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

[TS] Fails with children after #372 #384

Closed
Ailrun opened this issue Feb 16, 2018 · 3 comments
Closed

[TS] Fails with children after #372 #384

Ailrun opened this issue Feb 16, 2018 · 3 comments

Comments

@Ailrun
Copy link
Contributor

Ailrun commented Feb 16, 2018

This issue is originally issued by @denis-sokolov.
#372 (comment)

Relevant code.

<Div>
  <Div />
</Div>

What you did:
Add children to named built-in components.

What happened:

index.tsx(90,7): error TS2322: Type '{ children: Element; }' is not assignable to type 'IntrinsicAttributes & CSSProperties & ExtraGlamorousProps & HTMLProps<HTMLDivElement> & { childre...'.
  Type '{ children: Element; }' is not assignable to type 'CSSProperties'.
    Property 'children' is incompatible with index signature.
      Type 'Element' is not assignable to type 'string | number | SingleOrArray<CSSPropertiesCompleteSingle, "alignContent" | "alignItems" | "ali...'.
        Type 'Element' is not assignable to type '(string | number | {} | ("inherit" | "initial" | "unset" | "flex-start" | "flex-end" | "center" |...'.```

Reproduction:

Failed to reproduce.

Problem description:

Suggested solution:

It looks like already solved in up-to-date glamorous.

@Ailrun
Copy link
Contributor Author

Ailrun commented Feb 16, 2018

@luke-john the issue is added!

@denis-sokolov
Copy link

I am unable to reproduce the problem with the new glamorous version.

Either I messed up the original bug isolation, or there were other differences that have been changed in the meantime. Either way, I think the issue is solved until someone else comes with a similar complaint. Thank you for being so thorough and not dismissing my concerns, @Ailrun.

I had the original problem with glamor@2.20.40, glamorous@4.11.0+#372, react@16.2.0, typescript@2.6.1. Today I am unable to reproduce with glamor@2.20.40, glamorous@4.11.6, react@16.2.0, typescript@2.6.1.

@Ailrun
Copy link
Contributor Author

Ailrun commented Feb 19, 2018

@denis-sokolov I updated the infos and IMO, It's ok to close this. Thank you for giving detail infos.

@Ailrun Ailrun closed this as completed Feb 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants