From: Jérôme Benoit Date: Thu, 13 May 2021 17:48:51 +0000 (+0200) Subject: Make the default circular array size a const X-Git-Tag: v1.0.1-0~15 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=1699e597e585e54f8f0f540656597d6427080e0c;p=e-mobility-charging-stations-simulator.git Make the default circular array size a const Signed-off-by: Jérôme Benoit --- diff --git a/src/utils/CircularArray.ts b/src/utils/CircularArray.ts index 3e489f64..c46b06b6 100644 --- a/src/utils/CircularArray.ts +++ b/src/utils/CircularArray.ts @@ -1,11 +1,11 @@ +const DEFAULT_CIRCULAR_ARRAY_SIZE = 2000; export default class CircularArray extends Array { public size: number; - private readonly defaultCircularArraySize = 2000; constructor(size?: number) { super(); - this.size = size ?? this.defaultCircularArraySize; + this.size = size ?? DEFAULT_CIRCULAR_ARRAY_SIZE; } public push(...items: T[]): number {