mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
18 lines
456 B
TypeScript
18 lines
456 B
TypeScript
import shuffle from 'fast-shuffle';
|
|
|
|
{
|
|
const d1 = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'];
|
|
const d2: string[] = shuffle(d1);
|
|
const d3: string[] = shuffle(d1, () => 0.42);
|
|
}
|
|
|
|
{
|
|
const d1 = [
|
|
{ name: 'Alice', money: 10 },
|
|
{ name: 'Betty', money: 20 },
|
|
{ name: 'Cindy', money: 15 }
|
|
];
|
|
const d2: Array<{ name: string, money: number }> = shuffle(d1);
|
|
const d3: Array<{ name: string, money: number }> = shuffle(d1, () => 0.42);
|
|
}
|