question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incompatibilities with @types/react

See original GitHub issue

I was taking a look at what it would take to get @types/react to use csstype instead of its own internal definition for CSSProperties. So far I’ve run into the following issues:

  1. CSSProperties uses numeric literals for fontWeight:

    fontWeight?: CSSWideKeyword | "normal" | "bold" | "bolder" | "lighter" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
    

    whereas csstype uses all string literals:

    type FontWeightProperty = All | "900" | "bold" | "bolder" | "lighter" | "100" | "200" | "normal" | "400" | "500" | "600" | "700" | "800" | "300";
    

    Could this be changed to use numeric literals?

  2. SVG properties such as fillOpacity, strokeOpacity and strokeWidth appear to be missing.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
freniccommented, Apr 3, 2018

Thank you! I’ll do my best with SVG properties as soon as possible.

2reactions
pelotomcommented, Apr 3, 2018

FYI I’ve opened a PR on @types/react to use csstype as-is with a string index fallback: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24688

Read more comments on GitHub >

github_iconTop Results From Across the Web

Types of property 'type' are incompatible. Problem with ...
I am building a react site with some reusable generic UI components. Our backend service will return some responses with the data conforming...
Read more >
Problems with Types in React - codeburst
Problems with Types in React. Type checkers help to identify certain types of problems before you even run your code.
Read more >
Documentation - Type Compatibility - TypeScript
Type compatibility in TypeScript is based on structural subtyping. Structural typing is a way of relating types based solely on their members.
Read more >
Drug incompatibilities in the adult intensive care unit of ... - NCBI
Drug incompatibilities are physical and chemical reactions that occur in ... The major reason for differentiating these two types of incompatibilities is ...
Read more >
the types returned by 'render()' are incompatible between ...
Its instance type 'ReactApexChart' is not a valid JSX element. The types returned by 'render()' are incompatible between these types. Type 'React.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found