mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
ramda: add number key type to zipObj (#35717)
* ramda: add number key type to zipObj * Add tests for zipObj * Remove trailing whitespace * Remove trailing whitespace
This commit is contained in:
parent
4673dba6fe
commit
37b081e89f
2
types/ramda/index.d.ts
vendored
2
types/ramda/index.d.ts
vendored
@ -3131,6 +3131,8 @@ declare namespace R {
|
||||
// TODO: Dictionary<T> as a return value is to specific, any seems to loose
|
||||
zipObj<T>(keys: ReadonlyArray<string>, values: ReadonlyArray<T>): { [index: string]: T };
|
||||
zipObj(keys: ReadonlyArray<string>): <T>(values: ReadonlyArray<T>) => { [index: string]: T };
|
||||
zipObj<T>(keys: ReadonlyArray<number>, values: ReadonlyArray<T>): { [index: number]: T };
|
||||
zipObj(keys: ReadonlyArray<number>): <T>(values: ReadonlyArray<T>) => { [index: number]: T };
|
||||
|
||||
/**
|
||||
* Creates a new list out of the two supplied by applying the function to each
|
||||
|
||||
@ -1582,6 +1582,8 @@ type Pair = KeyValuePair<string, number>;
|
||||
() => {
|
||||
R.zipObj(["a", "b", "c"], [1, 2, 3]); // => {a: 1, b: 2, c: 3}
|
||||
R.zipObj(["a", "b", "c"])([1, 2, 3]); // => {a: 1, b: 2, c: 3}
|
||||
R.zipObj([1, 2, 3], ['a', 'b', 'c']); // => {1: 'a', 2: 'b', 3: 'c'}
|
||||
R.zipObj([1, 2, 3])(['a', 'b', 'c']); // => {1: 'a', 2: 'b', 3: 'c'}
|
||||
};
|
||||
|
||||
() => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user