Readonly<Promise<ListClusters>> 我还应该使用等待吗?

时间:2021-05-05 15:42:56

标签: typescript promise readonly sonarlint

我有一个返回 Readonly<Promise<ListClusters>>

的方法

我使用 SonarLint 触发警告 SonarLint: Refactor this redundant 'await' on a non-promise.

但我觉得这是误报。这是对的吗?如果是,如何在不完全消除警告的情况下更正 SonarLint?

Readonly 在这里的作用是什么?

0 个答案:

没有答案