这就是我到目前为止所拥有的。我尝试了许多潜在的解决方案,但下面始终收到相同的错误。任何线索或信息都将非常有帮助。
Name: Python
Id: ms-python.python
Description: Linting, Debugging (multi-threaded, remote), Intellisense, code formatting, refactoring, unit tests, snippets, and more.
Version: 2019.11.50794
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-python.python
这是我一直遇到的错误...
Python Language Server
答案 0 :(得分:0)
似乎transaction.localTickets
的类型是
interface TicketOptions {
readonly serviceId: string | null;
readonly description: string | null;
readonly requestedAt: string | null;
readonly status: string | null;
readonly requester: RequestedOptions | null;
}
RequestedOptions
在哪里
interface RequestedOptions {
name: string | null;
}
因此,TS认为您的TicketOptions
类型和transaction.localTickets
不兼容。只需按照上面所示制作TicketOptions
和RequestedOptions
,它就可以解决您的问题。