Add TSDocs

This commit is contained in:
NightKev 2025-04-27 17:14:50 -07:00
parent fd09bd746d
commit cb42cf50dc

View File

@ -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<T>(input: T | T[]): T[] {
return Array.isArray(input) ? input : [input];
}