Skip to content

Instantly share code, notes, and snippets.

@chadaustin
Created July 29, 2016 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chadaustin/40fa6791d34bf740b843028b67f592a3 to your computer and use it in GitHub Desktop.
Save chadaustin/40fa6791d34bf740b843028b67f592a3 to your computer and use it in GitHub Desktop.
declare module 'circular-buffer' {
class CircularBuffer<T> {
constructor(capacity: number);
size(): number;
capacity(): number;
enq(value: T): void;
deq(): T;
get(idx: number): T;
get(start, end): T[];
toarray(): T[];
}
export = CircularBuffer;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment