有没有办法打开“无 float promise ”但让它忽略像“toEqual”、“toBe”等 Jasmine promise ?我想使用它,但它到处提示我的期望语句。
expect(1).toEqual(1) // Would complain about this
例如:
最佳答案
我用 void
Jasmine 期望的关键字。虽然有一些关于它有多合适的讨论:https://github.com/palantir/tslint/issues/4653
void expect(1).toEqual(1) // Would not complain about this
关于typescript - 当 tslint 中的 "no-floating-promises"为真时如何忽略 Jasmine promise ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56938854/