mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 14:27:04 +00:00
ramda: Use typescript@2.8 (#25424)
This commit is contained in:
Vendored
+4
-5
@@ -19,13 +19,12 @@
|
||||
// Keagan McClelland <https://github.com/CaptJakk>
|
||||
// Tomas Szabo <https://github.com/deftomat>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.6
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
declare let R: R.Static;
|
||||
|
||||
declare namespace R {
|
||||
type Diff<T extends string, U extends string> = ({[P in T]: P } & {[P in U]: never } & { [x: string]: never })[T];
|
||||
type Omit<T, K extends string> = Pick<T, Diff<keyof T, K>>;
|
||||
type Omit<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
|
||||
|
||||
type Ord = number | string | boolean;
|
||||
|
||||
@@ -1296,8 +1295,8 @@ declare namespace R {
|
||||
* Returns a partial copy of an object containing only the keys specified. If the key does not exist, the
|
||||
* property is ignored.
|
||||
*/
|
||||
pick<T, K extends string>(names: ReadonlyArray<K>, obj: T): Pick<T, Diff<keyof T, keyof Omit<T, K>>>;
|
||||
pick<K extends string>(names: ReadonlyArray<K>): <T>(obj: T) => Pick<T, Diff<keyof T, keyof Omit<T, K>>>;
|
||||
pick<T, K extends string>(names: ReadonlyArray<K>, obj: T): Pick<T, Exclude<keyof T, Exclude<keyof T, K>>>;
|
||||
pick<K extends string>(names: ReadonlyArray<K>): <T>(obj: T) => Pick<T, Exclude<keyof T, Exclude<keyof T, K>>>;
|
||||
|
||||
/**
|
||||
* Similar to `pick` except that this one includes a `key: undefined` pair for properties that don't exist.
|
||||
|
||||
Reference in New Issue
Block a user