ramda: Use typescript@2.8 (#25424)

This commit is contained in:
Andy
2018-05-07 11:31:29 -07:00
committed by Sheetal Nandi
parent 908da1fb1d
commit fefafb09f4
+4 -5
View File
@@ -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.