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.

type error with react 16.3.1

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.3.3

Environment

@types/react 16.3.4 , antd 3.4.0

Reproduction link

https://github.com/whtsky/antd-react-16.3.1-type

Steps to reproduce

npx tsc

What is expected?

compile

What is actually happening?

node_modules/antd/lib/badge/ScrollNumber.d.ts(28,81): error TS2344: Type ‘{ className: string; style: { transition: string | boolean; msTransform: string; WebkitTransform:…’ does not satisfy the constraint ‘HTMLAttributes<HTMLElement>’. Types of property ‘style’ are incompatible. Type ‘{ transition: string | boolean; msTransform: string; WebkitTransform: string; transform: string; }’ is not assignable to type ‘CSSProperties’. Types of property ‘transition’ are incompatible. Type ‘string | boolean’ is not assignable to type ‘string’. Type ‘true’ is not assignable to type ‘string’. node_modules/antd/lib/badge/ScrollNumber.d.ts(38,77): error TS2344: Type ‘{ className: string; style: { transition: string | boolean; msTransform: string; WebkitTransform:…’ does not satisfy the constraint ‘HTMLAttributes<HTMLElement>’. Types of property ‘style’ are incompatible. Type ‘{ transition: string | boolean; msTransform: string; WebkitTransform: string; transform: string; }’ is not assignable to type ‘CSSProperties’. Types of property ‘transition’ are incompatible. Type ‘string | boolean’ is not assignable to type ‘string’. Type ‘true’ is not assignable to type ‘string’.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:16
  • Comments:23 (9 by maintainers)

github_iconTop GitHub Comments

12reactions
alesdrobyshcommented, Apr 7, 2018

as a temporary solution it works to add skipLibCheck flag to tsconfig

11reactions
yesmeckcommented, Apr 4, 2018

@whtsky I don’t see codes in your repo.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Navbar error with React 16.3.1 - Material Design for Bootstrap
I get the following error in Chrome dev console from React: warning.js:33 Warning: Received `true` for a non-boolean attribute `left`. If you want...
Read more >
Context Components in React 16.3 are invalid - Stack Overflow
Uncaught Error: Element type is invalid : expected a string (for built-in components) or a class/function (for composite components) but got: ...
Read more >
React v16.3.0: New lifecycles and context API
Version 16.3 introduces a new context API that is more efficient and supports both static type checking and deep updates.
Read more >
Refs and the DOM - React
The value of the ref differs depending on the type of the node: When the ref attribute is used on an HTML element,...
Read more >
React v16.0 – React Blog
New render return types: fragments and strings · Better error handling · Portals · Better server-side rendering · Support for custom DOM attributes....
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