Skip to content

Commit e0bde26

Browse files
committed
Better type
1 parent b2c3b2d commit e0bde26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ export const randUniform = (a: number, b: number): number => {
1010
return Math.random() * (b - a) + a;
1111
};
1212

13-
export const randChoice = <T>(array: T[] | readonly T[]): T => {
13+
export const randChoice = <T>(array: readonly T[]): T => {
1414
return array[Math.floor(Math.random() * array.length)];
1515
};

0 commit comments

Comments
 (0)