I kept the deprecated `pick` declarations, but added the proposed (JSDoc-influenced) [deprecation annotation](https://github.com/Microsoft/TypeScript/issues/390) to them. The added `pickone` and `pickset` declarations have identical types to their respective `pick` flavors.
This commit is contained in:
Leo Rudberg
2016-09-14 08:20:28 -05:00
committed by Masahiro Wakame
parent ff71c3d812
commit b73aaa36d3

8
chance/chance.d.ts vendored
View File

@@ -114,8 +114,16 @@ declare namespace Chance {
capitalize(str: string): string;
mixin(desc: MixinDescriptor): any;
pad(num: number, width: number, padChar?: string): string;
/**
* @deprecated Use pickone
*/
pick<T>(arr: T[]): T;
pickone<T>(arr: T[]): T;
/**
* @deprecated Use pickset
*/
pick<T>(arr: T[], count: number): T[];
pickset<T>(arr: T[], count: number): T[];
set: Setter;
shuffle<T>(arr: T[]): T[];