Skip to content

Commit 32b16f4

Browse files
authored
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.
1 parent 55c3e25 commit 32b16f4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

chance/chance.d.ts

+8
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,16 @@ declare namespace Chance {
114114
capitalize(str: string): string;
115115
mixin(desc: MixinDescriptor): any;
116116
pad(num: number, width: number, padChar?: string): string;
117+
/**
118+
* @deprecated Use pickone
119+
*/
117120
pick<T>(arr: T[]): T;
121+
pickone<T>(arr: T[]): T;
122+
/**
123+
* @deprecated Use pickset
124+
*/
118125
pick<T>(arr: T[], count: number): T[];
126+
pickset<T>(arr: T[], count: number): T[];
119127
set: Setter;
120128
shuffle<T>(arr: T[]): T[];
121129

0 commit comments

Comments
 (0)