Possible to create type declarations for extended methods? (i.e., chai plugins)
未關閉
- 主要語言
- Rust
- 星號
- 22.3k
- 分支
- 1.9k
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Does anyone know if it's possible to create flow declarations for chai plugins?
For example, the `chai-as-promised` plugin adds methods like `.rejectedWith(error)` to `chai.expect()`, so you could use it like this:
`expect(myPromise).to.be.rejectedWith('some error message')`
So in this case, I'd be looking to add a definition for `rejectedWith` to the return type of chai's `expect` function (BTW, chai itself does have [flow-typed declarations](https://github.com/flowtype/flow-typed/tree/master/definitions/npm/chai_v3.5.x)).
貢獻指南
評估
這個 Issue 還沒有評估資料。