mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Correct expected promise type in fast-ratelimit test comments.
This commit is contained in:
@@ -7,11 +7,11 @@ const limit = new FastRateLimit({ // $type: FastRateLimit
|
||||
|
||||
const someNamespace = 'some-namespace';
|
||||
|
||||
const consume = limit.consume(someNamespace); // $type: Promise<any>
|
||||
const consume = limit.consume(someNamespace); // $type: Promise<void>
|
||||
consume.then(() => {}); // User can send message.
|
||||
consume.catch(() => {}); // Use cannot send message.
|
||||
|
||||
const hasToken = limit.hasToken(someNamespace); // $type: Promise<any>
|
||||
const hasToken = limit.hasToken(someNamespace); // $type: Promise<void>
|
||||
consume.then(() => {}); // User has remaining token.
|
||||
consume.catch(() => {}); // User does not have remaining token.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user