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.

Upgrade TypeScript to 2.3.x

See original GitHub issue

Version

2.10.2

Environment

win10 typescript@2.3.3 antd@2.10.2

Reproduction link

http://codepen.io/

Steps to reproduce

open antd\lib\mention\index.d.ts

What is expected?

export interface MentionProps {
    ...
    suggestions: Array<any>;
    ...
}

suggestions is required

What is actually happening?

(28,22): error TS2415: Class 'Mention' incorrectly extends base class 'Component<MentionProps, MentionState>'.
  Types of property 'componentWillReceiveProps' are incompatible.
    Type '({suggestions}: { suggestions: any; }) => void' is not assignable to type '(nextProps: Readonly<MentionProps>, nextContext: any) => void'.
      Types of parameters '__0' and 'nextProps' are incompatible.
        Type 'Readonly<MentionProps>' is not assignable to type '{ suggestions: any; }'.
          Property 'suggestions' is optional in type 'Readonly<MentionProps>' but required in type '{ suggestions: any; }'.

the suggestions optional

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
snipkingcommented, May 27, 2017

Actually it happens with @types/react@15.0.25.

Currently we back to @types/react@15.0.24 as a workaround.

Typescript 2.3.3 just working fine.

0reactions
martinnov92commented, Aug 30, 2017

any updates on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to upgrade Typescript to the latest version?
The first entry was similar to: C:\Program Files (x86)\Microsoft SDKs\TypeScript\x.xx . So I checked the PATH variable (both System and ...
Read more >
what's your process regarding breaking changes? : r/typescript
Use the breaking change doc and look at major version only. So look at 2.x -> 3.x breaking changes. Fix each manually, then...
Read more >
Documentation - TypeScript 2.3
This kind of iterator is useful for iterating over synchronously available values, such as the elements of an Array or the keys of...
Read more >
Documentation - TypeScript 3.9
TypeScript 3.9 Release Notes. ... you are in the middle of an upgrade between two different versions of TypeScript, ... declare let x:...
Read more >
Documentation - TypeScript 3.5
TypeScript 3.5 improves on 3.4's incremental build mode, by saving information about how the state of the world was calculated - compiler settings,...
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