Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
I kept the deprecated `pick` declarations, but added the proposed (JSDoc-influenced) [deprecation annotation](microsoft/TypeScript#390) to them. The added `pickone` and `pickset` declarations have identical types to their respective `pick` flavors.
  • Loading branch information
LOZORD authored Aug 20, 2016
1 parent 55c3e25 commit 32b16f4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions chance/chance.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];

Expand Down

0 comments on commit 32b16f4

Please sign in to comment.