|
1
4
您可以这样简化问题: 这会发出警告:
但这不会:
这是因为typescript不知道
(我承认,不是很优雅)
你应该阅读 https://www.typescriptlang.org/docs/handbook/advanced-types.html 了解详细信息。 |