Skip to content

Commit

Permalink
refactor(buffers): update type usage
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Apr 19, 2024
1 parent abad151 commit 95de331
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/buffers/src/fifo.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { IReadWriteBuffer } from "./api.js";
import type { Maybe } from "@thi.ng/api";
import { assert } from "@thi.ng/errors/assert";
import type { IReadWriteBuffer } from "./api.js";

/**
* Returns a {@link FIFOBuffer} ring buffer with given max. capacity.
Expand All @@ -18,7 +19,7 @@ export const fifo = <T>(cap: number) => new FIFOBuffer<T>(cap);
* First-in, first-out ring buffer implementation. See {@link fifo}.
*/
export class FIFOBuffer<T> implements IReadWriteBuffer<T> {
protected buf: (T | undefined)[];
protected buf: Maybe<T>[];
protected rpos = 0;
protected wpos = 0;
protected len = 0;
Expand Down

0 comments on commit 95de331

Please sign in to comment.