Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Jul 18, 2023
1 parent 32f5c32 commit 053401e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 17 deletions.
21 changes: 11 additions & 10 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,37 @@
# Contributors listed in alphabetical order.

Ali Salesi <[email protected]>
Amit Jimiwal <[email protected]>
Athan Reines <[email protected]>
Brendan Graetz <[email protected]>
Bruno Fenzl <[email protected]>
Christopher Dambamuromo <[email protected]>
Dan Rose <[email protected]>
Dominik Moritz <[email protected]>
Dorrin Sotoudeh <[email protected]>
Frank Kovacs <[email protected]>
Harshita Kalani <[email protected].com>
James <[email protected]>
Harshita Kalani <harshitakalani02@gmail.com>
James Gelok <[email protected]>
Jithin KS <[email protected]>
Joey Reed <[email protected]>
Jordan-Gallivan <[email protected]>
Jordan Gallivan <[email protected]>
Joris Labie <[email protected]>
Justin Dennison <[email protected]>
KATTA NAGA NITHIN <[email protected]>
Marcus <[email protected]>
Marcus Fantham <[email protected]>
Matt Cochrane <[email protected]>
Milan Raj <[email protected]>
Momtchil Momtchev <[email protected]>
Naresh Jagadeesan <[email protected]>
Naresh Jagadeesan <[email protected]>
Nithin Katta <[email protected]>
Ognjen Jevremović <[email protected]>
Philipp Burckhardt <[email protected]>
Pranav <[email protected]>
Pranav Goswami <[email protected]>
Ricky Reusser <[email protected]>
Roman Stetsyk <[email protected]>
Ryan Seal <[email protected]>
Seyyed Parsa Neshaei <[email protected]>
Shraddheya Shendre <[email protected]>
Stephannie Jiménez Gacha <[email protected]>
Yernar Yergaziyev <[email protected]>
dorrin-sot <[email protected]>
drunken_devv <[email protected]>
orimiles5 <[email protected]>
rei2hu <[email protected]>
rei2hu <[email protected]>
5 changes: 3 additions & 2 deletions omit/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

// TypeScript Version: 2.0
// TypeScript Version: 4.1

/**
* Returns a partial object copy excluding specified keys.
Expand All @@ -40,7 +40,8 @@
* var obj2 = omit( obj1, 'b' );
* // returns { 'a': 1 }
*/
declare function omit( obj: any, keys: string | Array<string> ): Object;
declare function omit<T extends object, K extends keyof T>( obj: T, keys: Array<K> | K ): Omit<T, K>; // tslint-disable-line max-line-length
declare function omit<T extends object>( obj: T, keys: Array<string> | string ): Partial<T>; // tslint-disable-line max-line-length


// EXPORTS //
Expand Down
4 changes: 2 additions & 2 deletions omit/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import omit = require( './index' );

// The function returns an object...
{
omit( { 'a': 1, 'b': 2 }, 'a' ); // $ExpectType Object
omit( { 'a': 1, 'b': 2 }, [ 'a', 'b' ] ); // $ExpectType Object
omit( { 'a': 1, 'b': 2 }, 'a' ); // $ExpectType Omit<{ a: number; b: number; }, "a">
omit( { 'a': 1, 'b': 2 }, [ 'a', 'b' ] ); // $ExpectType Omit<{ a: number; b: number; }, "a" | "b">
}

// The compiler throws an error if the function is provided a second argument which is not a string or string array...
Expand Down
4 changes: 2 additions & 2 deletions values/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

// TypeScript Version: 2.0
// TypeScript Version: 4.1

/**
* Returns an array of an object's own enumerable property values.
Expand All @@ -37,7 +37,7 @@
* var vals = objectValues( obj );
* // e.g., returns [ 'boop', 'bar' ]
*/
declare function objectValues( obj: any ): Array<any>;
declare function objectValues<T extends object>( obj: T ): Array<T[keyof T]>;


// EXPORTS //
Expand Down
4 changes: 3 additions & 1 deletion values/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import objectValues = require( './index' );

// The function returns an array of values...
{
objectValues( { 'beep': 'boop', 'foo': 3.14 } ); // $ExpectType Array<any>
objectValues( { 'beep': 'boop', 'foo': 'bar' } ); // $ExpectType string[]
objectValues( { 'beep': 'boop', 'foo': 3.14 } ); // $ExpectType (string | number)[]
objectValues( { 'beep': 'boop', 'foo': true } ); // $ExpectType (string | boolean)[]
}

// The compiler throws an error if the function is provided an incorrect number of arguments...
Expand Down

0 comments on commit 053401e

Please sign in to comment.