Skip to content

Commit 1cb7958

Browse files
authored
Fix StatusListener typing (#98)
* Fix StatusListener typing * test fix * bug fix only
1 parent 6a8bdb2 commit 1cb7958

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

status/index.d.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ interface StatusListener {
1717
| 'wait',
1818
details:
1919
| undefined
20-
| Error
20+
| { error: Error }
2121
| {
22-
action: Action
23-
meta: ClientMeta
24-
}
25-
): void
22+
action: Action
23+
meta: ClientMeta
24+
} ): void
2625
}
2726

2827
interface StatusOptions {

status/index.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ it('removes listeners', () => {
198198
})
199199

200200
let calls = 0
201-
let unbind = status(client, state => {
201+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
202+
let unbind = status(client, (state , details) => {
202203
if (state === 'denied') {
203204
calls += 1
204205
}

0 commit comments

Comments
 (0)