DefinitelyTyped/types/fast-shuffle/fast-shuffle-tests.ts
Piotr Roszatycki 6661fc03de fast-shuffle: new typings (#37470)
* fast-shuffle: new typings

* fast-shuffle: it's-a-me
2019-08-08 10:22:10 -07:00

18 lines
356 B
TypeScript

import shuffle from 'fast-shuffle';
{
const d1 = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'];
const d2 = shuffle(d1);
const d3 = shuffle(d1, () => 0.42);
}
{
const d1 = [
{ name: 'Alice', money: 10 },
{ name: 'Betty', money: 20 },
{ name: 'Cindy', money: 15 }
];
const d2 = shuffle(d1);
const d3 = shuffle(d1, () => 0.42);
}