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.

Incorrect typescript interface for RcFile in Upload component [regression]

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

Version

3.8.0

Environment

all

Reproduction link

http://check.the.description

Steps to reproduce

Try to build using Typescript and antd version 3.8.0

What is expected?

Build is ok

What is actually happening?

Build fails with:

node_modules/antd/lib/upload/interface.d.ts:6:18 - error TS2430: Interface 'RcFile' incorrectly extends interface 'File'.
  Property 'lastModifiedDate' is optional in type 'RcFile' but required in type 'File'.

This was introduced here (lastModifiedDate is optional): https://github.com/ant-design/ant-design/commit/2f81349c21d6acaf529a1c8dff77fba1f2fb7139#diff-eeab2da14d4b4db1d3de81fa26173037R11

It is in conflict with the typescript lb typings (lastModifiedDate is required): https://github.com/Microsoft/TypeScript/blob/master/lib/lib.dom.d.ts#L5282

Can we revert that change? (I can create a PR)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
104gogocommented, Aug 8, 2018

@apieceofbart thank you, it works!

0reactions
sbuschcommented, Aug 13, 2018

Fixed for TypeScript 2.9.2 users in latest antd release 3.8.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't use interfaces from another file when they import any ...
1 Answer 1 · I try to change compiler options into 'es6' but I doesn't see any difference in compilation process. I got...
Read more >
Visual Studio 2019 version 16.4 Release Notes | Microsoft Learn
A remote code execution vulnerability exists when Visual Studio loads a malicious repository containing JavaScript or TypeScript code files.
Read more >
Bug listing with status RESOLVED with resolution TEST ...
Bug:233 - "Emacs segfaults when merged through the sandbox." status:RESOLVED resolution:TEST-REQUEST severity:critical · Bug:3888 - "yenta_socket module not ...
Read more >
PyCharm 173.3727.137 Release Notes - JetBrains YouTrack
Feature PY‑20770 Support Python 3.6 asynchronous generators and comprehensions Feature PY‑21768 Semantic highlighting for Python Bug PY‑19573 Python console ‑ no output under OS X Bug...
Read more >
Handbook - Interfaces - TypeScript
In TypeScript, interfaces fill the role of naming these types, and are a powerful way of defining contracts within your code as well...
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