Incompatibilities with @types/react
See original GitHub issueI 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:
-
CSSProperties
uses numeric literals forfontWeight
: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?
-
SVG properties such as
fillOpacity
,strokeOpacity
andstrokeWidth
appear to be missing.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you! I’ll do my best with SVG properties as soon as possible.
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