Skip to content

Instantly share code, notes, and snippets.

View KilianB's full-sized avatar

Kilian Brachtendorf KilianB

  • Germany
View GitHub Profile
@jerome-benoit
jerome-benoit / CircularArray.md
Last active September 3, 2022 22:07
TypeScript circular array module
/**
 * Default circular array size.
 */
export const DEFAULT_CIRCULAR_ARRAY_SIZE = 2000

/** Array with a maximum length shifting items when full. */
export class CircularArray<T> extends Array<T> {
  /** @inheritdoc */
  public size: number