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
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:
- Created 5 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top 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 >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
@apieceofbart thank you, it works!
Fixed for TypeScript 2.9.2 users in latest antd release
3.8.1