Files
DefinitelyTyped/types/pick-weight/pick-weight-tests.ts
Roberts Slisans 4bcdebd32e Added pick-weight (#18693)
* Created definitions & tests for pick-weight 🎲

* Fix no-single-module
2017-08-08 14:22:46 -07:00

7 lines
156 B
TypeScript

import * as weight from "pick-weight";
const x = weight(["a", "b", "c"], [1, 2, 3]);
// Can only be applied since inferred type is string
x === "string";