mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
18 lines
260 B
TypeScript
18 lines
260 B
TypeScript
import Fifo = require("p-fifo");
|
|
|
|
const fifo = new Fifo<string>();
|
|
|
|
(async () => {
|
|
// $ExpectType void
|
|
await fifo.push("a");
|
|
|
|
// $ExpectError
|
|
fifo.push(true);
|
|
|
|
// $ExpectType string
|
|
await fifo.shift();
|
|
})();
|
|
|
|
// $ExpectType boolean
|
|
fifo.isEmpty();
|