From cb42cf50dc7de43202796fd572d4cd31f831287f Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Sun, 27 Apr 2025 17:14:50 -0700 Subject: [PATCH] Add TSDocs --- src/utils/common.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/common.ts b/src/utils/common.ts index 62252d250ec..83e99be378b 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -612,6 +612,10 @@ export function getShinyDescriptor(variant: Variant): string { } } +/** + * If the input isn't already an array, turns it into one. + * @returns An array with the same type as the type of the input + */ export function coerceArray(input: T | T[]): T[] { return Array.isArray(input) ? input : [input]; }