Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

Commit

Permalink
feat(filter-like): return Partial for objects (#45)
Browse files Browse the repository at this point in the history
* feat(filter): return partial
* feat(omit): return partial
* feat(pick): return partial and pick
* feat(pickAll): return partial and pick
* feat(pickBy): return partial
* feat(partition): return partial
  • Loading branch information
ikatyang authored Jul 18, 2017
1 parent 56bfbd2 commit 9eaa862
Show file tree
Hide file tree
Showing 26 changed files with 211 additions and 142 deletions.
4 changes: 2 additions & 2 deletions snapshots/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ R_filter(string_predicate, string_array);
// @dts-jest:pass -> string[]
R_filter(string_predicate)(string_array);

// @dts-jest:pass -> Dictionary<string>
// @dts-jest:pass -> Partial<Dictionary<string>>
R_filter(string_predicate, string_dictionary);
// @dts-jest:pass -> Dictionary<string>
// @dts-jest:pass -> Partial<Dictionary<string>>
R_filter(string_predicate)(string_dictionary);

// @dts-jest:pass -> Filterable<string>
Expand Down
8 changes: 4 additions & 4 deletions snapshots/omit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ R_omit([string])(object);
// @dts-jest:pass -> object
R_omit([string], object);

// @dts-jest:pass -> Record<string, string>
R_omit([string])<Record<string, string>>(object);
// @dts-jest:pass -> Record<string, string>
R_omit<Record<string, string>>([string], object);
// @dts-jest:pass -> object
R_omit([string])(object);
// @dts-jest:pass -> object
R_omit([string], object);
9 changes: 2 additions & 7 deletions snapshots/partition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ R_partition(number_to_boolean)(number_array);
// @dts-jest:pass -> [number[], number[]]
R_partition(number_to_boolean, number_array);

// @dts-jest:pass -> [Record<string, number>, Record<string, number>]
// @dts-jest:pass -> [Partial<{ a: 1; b: 2; c: 3; }>, Partial<{ a: 1; b: 2; c: 3; }>]
R_partition(number_to_boolean)(a_1_b_2_c_3);
// @dts-jest:pass -> [Record<string, number>, Record<string, number>]
// @dts-jest:pass -> [Partial<{ a: 1; b: 2; c: 3; }>, Partial<{ a: 1; b: 2; c: 3; }>]
R_partition(number_to_boolean, a_1_b_2_c_3);

// @dts-jest:pass -> [Record<"a", number>, Record<"b" | "c", number>]
R_partition(number_to_boolean)<'a', 'b' | 'c'>(a_1_b_2_c_3);
// @dts-jest:pass -> [Record<"a", number>, Record<"b" | "c", number>]
R_partition<number, 'a', 'b' | 'c'>(number_to_boolean, a_1_b_2_c_3);
13 changes: 9 additions & 4 deletions snapshots/pick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ import * as R_pick from '../ramda/dist/src/pick';

declare const object: object;
declare const string: string;
declare const a_1_b_2_c_3: {
a: 1,
b: 2,
c: 3,
};

// @dts-jest:pass -> object
R_pick([string])(object);
// @dts-jest:pass -> object
R_pick([string], object);

// @dts-jest:pass -> Record<string, string>
R_pick([string])<Record<string, string>>(object);
// @dts-jest:pass -> Record<string, string>
R_pick<Record<string, string>>([string], object);
// @dts-jest:pass -> Partial<{ a: 1; b: 2; c: 3; }>
R_pick(['a', 'c'])(a_1_b_2_c_3);
// @dts-jest:pass -> Pick<{ a: 1; b: 2; c: 3; }, "a" | "c">
R_pick(['a', 'c'], a_1_b_2_c_3);
18 changes: 14 additions & 4 deletions snapshots/pickAll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@ import * as R_pickAll from '../ramda/dist/src/pickAll';

declare const object: object;
declare const string: string;
declare const a_1_b_2_c_3: {
a: 1,
b: 2,
c: 3,
};

// @dts-jest:pass -> object
R_pickAll([string])(object);
// @dts-jest:pass -> object
R_pickAll([string], object);

// @dts-jest:pass -> Record<string, string>
R_pickAll([string])<Record<string, string>>(object);
// @dts-jest:pass -> Record<string, string>
R_pickAll<Record<string, string>>([string], object);
// @dts-jest:pass -> Partial<{ a: 1; b: 2; c: 3; }>
R_pickAll(['a', 'c'])(a_1_b_2_c_3);
// @dts-jest:pass -> Pick<{ a: 1; b: 2; c: 3; }, "a" | "c">
R_pickAll(['a', 'c'], a_1_b_2_c_3);

// @dts-jest:pass -> Partial<{ a: 1; b: 2; c: 3; }>
R_pickAll(['a', 'c', 'f'])(a_1_b_2_c_3);
// @dts-jest:pass -> Partial<{ a: 1; b: 2; c: 3; }>
R_pickAll(['a', 'c', 'f'], a_1_b_2_c_3);
34 changes: 25 additions & 9 deletions snapshots/pickBy.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
import * as R_pickBy from '../ramda/dist/src/pickBy';

declare const number_string_object_to_boolean: (x: number, k: string, o: object) => boolean;
declare const string_string_object_to_boolean: (x: string, k: string, o: object) => boolean;
declare const object: object;
declare const string_number_record: Record<string, number>;
declare const a_1_b_2_c_3: {
a: 1,
b: 2,
c: 3,
};

// @dts-jest:pass -> object
R_pickBy(string_string_object_to_boolean)(object);
// @dts-jest:pass -> object
R_pickBy(string_string_object_to_boolean, object);
// @dts-jest:fail -> Argument of type 'Record<string, number>' is not assignable to parameter of type 'Dictionary<string>'.
R_pickBy(string_string_object_to_boolean)(string_number_record);
// @dts-jest:fail -> Argument of type 'Record<string, number>' is not assignable to parameter of type 'Dictionary<string>'.
R_pickBy(string_string_object_to_boolean, string_number_record);

// @dts-jest:pass -> Record<string, string>
R_pickBy(string_string_object_to_boolean)<Record<string, string>>(object);
// @dts-jest:pass -> Record<string, string>
R_pickBy<Record<string, string>>(string_string_object_to_boolean, object);
// @dts-jest:fail -> Argument of type '{ a: 1; b: 2; c: 3; }' is not assignable to parameter of type 'Dictionary<string>'.
R_pickBy(string_string_object_to_boolean)(a_1_b_2_c_3);
// @dts-jest:fail -> Argument of type '{ a: 1; b: 2; c: 3; }' is not assignable to parameter of type 'Dictionary<string>'.
R_pickBy(string_string_object_to_boolean, a_1_b_2_c_3);

// @dts-jest:pass -> Partial<Dictionary<number>>
R_pickBy(number_string_object_to_boolean)(string_number_record);
// @dts-jest:pass -> Partial<Record<string, number>>
R_pickBy(number_string_object_to_boolean, string_number_record);

// @dts-jest:pass -> Partial<Dictionary<number>>
R_pickBy(number_string_object_to_boolean)(a_1_b_2_c_3);
// @dts-jest:pass -> Partial<{ a: 1; b: 2; c: 3; }>
R_pickBy(number_string_object_to_boolean, a_1_b_2_c_3);
62 changes: 31 additions & 31 deletions snapshots/ramda-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -857,9 +857,9 @@ import * as R from '../ramda/dist/index';
R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4]
// @dts-jest:pass -> number[]
R.filter(isEven)([1, 2, 3, 4]);
// @dts-jest:pass -> Dictionary<number>
// @dts-jest:pass -> Partial<{ a: number; b: number; c: number; d: number; }>
R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}
// @dts-jest:pass -> Dictionary<number>
// @dts-jest:pass -> Partial<{ a: number; b: number; c: number; d: number; }>
R.filter(isEven)({a: 1, b: 2, c: 3, d: 4});
})();

Expand Down Expand Up @@ -1965,10 +1965,10 @@ import * as R from '../ramda/dist/index';

// @dts-jest:group omit
(() => {
// @dts-jest:pass -> { b: number; c: number; }
R.omit<{b: number, c: number}>(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}
// @dts-jest:pass -> { b: number; c: number; }
R.omit(['a', 'd'])<{b: number, c: number}>({a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}
// @dts-jest:pass -> Partial<{ a: number; b: number; c: number; d: number; }>
R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}
// @dts-jest:pass -> Partial<{ a: number; b: number; c: number; d: number; }>
R.omit(['a', 'd'])({a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}
})();

// @dts-jest:group once
Expand Down Expand Up @@ -2047,7 +2047,7 @@ import * as R from '../ramda/dist/index';
R.partition((x: number) => x > 2, [1, 2, 3, 4]);
// @dts-jest:pass -> [number[], number[]]
R.partition((x: number) => x > 2)([1, 2, 3, 4]);
// @dts-jest:pass -> [Record<string, string[] | ArrayLike<string>>, Record<string, string[] | ArrayLike<string>>]
// @dts-jest:pass -> [Partial<{ a: string; b: string; foo: string; }>, Partial<{ a: string; b: string; foo: string; }>]
R.partition(R.contains('s'), {a: 'sss', b: 'ttt', foo: 'bars'}); //=> [ { a: 'sss', foo: 'bars' }, { b: 'ttt' } ]
})();

Expand Down Expand Up @@ -2102,32 +2102,32 @@ import * as R from '../ramda/dist/index';

// @dts-jest:group pick
(() => {
// @dts-jest:pass -> { a: number; }
R.pick<{a: number}>(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1}
// @dts-jest:pass -> { a: number; }
R.pick(['a', 'e', 'f'])<{a: number}>({a: 1, b: 2, c: 3, d: 4}); //=> {a: 1}
// @dts-jest:pass -> {}
R.pick<{}>(['a', 'e', 'f'], [1, 2, 3, 4]); //=> {}
// @dts-jest:pass -> Partial<{ a: number; b: number; c: number; d: number; }>
R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1}
// @dts-jest:pass -> Partial<{ a: number; b: number; c: number; d: number; }>
R.pick(['a', 'e', 'f'])({a: 1, b: 2, c: 3, d: 4}); //=> {a: 1}
// @dts-jest:pass -> Partial<number[]>
R.pick(['a', 'e', 'f'], [1, 2, 3, 4]); //=> {}
// @dts-jest:pass -> Pick<{ a: number; b: number; c: number; d: number; }, "a" | "c" | "d">
R.pick(['a', 'c', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, c: 3, d: 4}
// @dts-jest:pass -> Partial<number[]>
R.pick(['0', '2', '3'], [1, 2, 3, 4]); //=> {0: 1, 2: 3, 3: 4}
})();

// @dts-jest:group pickAll
(() => {
// @dts-jest:pass -> Record<string, number>
R.pickAll<Record<string, number>>(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4}
// @dts-jest:pass -> Record<string, number>
R.pickAll(['a', 'd'])<Record<string, number>>({a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4}
// @dts-jest:pass -> Record<string, number>
R.pickAll<Record<string, number>>(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, e: undefined, f: undefined}
// @dts-jest:pass -> Record<string, number>
R.pickAll(['a', 'e', 'f'])<Record<string, number>>({a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, e: undefined, f: undefined}
// @dts-jest:pass -> Pick<{ a: number; b: number; c: number; d: number; }, "a" | "d">
R.pickAll(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4}
// @dts-jest:pass -> Partial<{ a: number; b: number; c: number; d: number; }>
R.pickAll(['a', 'd'])({a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4}
// @dts-jest:pass -> Partial<{ a: number; b: number; c: number; d: number; }>
R.pickAll(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, e: undefined, f: undefined}
// @dts-jest:pass -> Partial<{ a: number; b: number; c: number; d: number; }>
R.pickAll(['a', 'e', 'f'])({a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, e: undefined, f: undefined}
})();

// @dts-jest:group pickBy
(() => {
interface Color {
color: string;
bgcolor: string;
}
const colors = {
1: {color: 'read'},
2: {color: 'black', bgcolor: 'yellow'},
Expand All @@ -2136,12 +2136,12 @@ import * as R from '../ramda/dist/index';
const containsBackground = (val: any) => val.bgcolor;
const isUpperCase = (val: number, key: string) => key.toUpperCase() === key;

// @dts-jest:pass -> Record<string, number>
R.pickBy<Record<string, number>>(isPositive, {a: 1, b: 2, c: -1, d: 0, e: 5}); //=> {a: 1, b: 2, e: 5}
// @dts-jest:pass -> Record<string, Color>
R.pickBy<Record<string, Color>>(containsBackground, colors); //=> {2: {color: 'black', bgcolor: 'yellow'}}
// @dts-jest:pass -> Record<string, number>
R.pickBy<Record<string, number>>(isUpperCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4}
// @dts-jest:pass -> Partial<{ a: number; b: number; c: number; d: number; e: number; }>
R.pickBy(isPositive, {a: 1, b: 2, c: -1, d: 0, e: 5}); //=> {a: 1, b: 2, e: 5}
// @dts-jest:pass -> Partial<{ 1: { color: string; }; 2: { color: string; bgcolor: string; }; }>
R.pickBy(containsBackground, colors); //=> {2: {color: 'black', bgcolor: 'yellow'}}
// @dts-jest:pass -> Partial<{ a: number; b: number; A: number; B: number; }>
R.pickBy(isUpperCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4}
})();

// @dts-jest:group pipe
Expand Down
2 changes: 1 addition & 1 deletion templates/filter.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import {Dictionary, Filterable, List, Predicate} from './$types';

export function $list<T>(fn: Predicate<T>, list: List<T>): T[];
export function $filterable<T, U extends Filterable<T>>(fn: Predicate<T>, filterable: U): U;
export function $dictionary<T>(fn: Predicate<T>, object: Dictionary<T>): Dictionary<T>;
export function $object<T, U extends Dictionary<T>>(fn: Predicate<T>, object: U): Partial<U>;
3 changes: 1 addition & 2 deletions templates/omit.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {List, Property} from './$types';

export function $remain<T>(keys: List<Property>, object: T): T;
export function $manual<V>(keys: List<Property>, object: any): V;
export function $<T>(keys: List<Property>, object: T): Partial<T>;
3 changes: 1 addition & 2 deletions templates/partition.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {Dictionary, List, Predicate} from './$types';

export function $list<T>(fn: Predicate<T>, list: List<T>): [T[], T[]];
export function $object<T, KT extends string, KF extends string>(fn: Predicate<T>, object: Record<KT | KF, T>): [Record<KT, T>, Record<KF, T>];
export function $dictionary<T>(fn: Predicate<T>, dictionary: Dictionary<T>): [Dictionary<T>, Dictionary<T>];
export function $object<T, U extends Dictionary<T>>(fn: Predicate<T>, dictionary: U): [Partial<U>, Partial<U>];
4 changes: 2 additions & 2 deletions templates/pick.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {List, Property} from './$types';

export function $remain<T>(keys: List<Property>, object: T): T;
export function $manual<V>(keys: List<Property>, object: any): V;
export function $pick<T, K extends keyof T>(keys: List<K>, object: T): Pick<T, K>;
export function $partial<T>(keys: List<Property>, object: T): Partial<T>;
4 changes: 2 additions & 2 deletions templates/pickAll.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {List, Property} from './$types';

export function $remain<T>(keys: List<Property>, object: T): T;
export function $manual<V>(keys: List<Property>, object: any): V;
export function $pick<T, K extends keyof T>(keys: List<K>, object: T): Pick<T, K>;
export function $partial<T>(keys: List<Property>, object: T): Partial<T>;
5 changes: 2 additions & 3 deletions templates/pickBy.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {KeyedObjectMorphism} from './$types';
import {Dictionary, KeyedObjectMorphism} from './$types';

export function $remain<T>(fn: KeyedObjectMorphism<any, boolean, string>, object: T): T;
export function $manual<V>(fn: KeyedObjectMorphism<any, boolean, string>, object: any): V;
export function $<T, U extends Dictionary<T>>(fn: KeyedObjectMorphism<T, boolean, keyof U>, object: U): Partial<U>;
4 changes: 2 additions & 2 deletions tests/__snapshots__/filter.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

exports[`R_filter(string_predicate)(string_array) 1`] = `"string[]"`;

exports[`R_filter(string_predicate)(string_dictionary) 1`] = `"Dictionary<string>"`;
exports[`R_filter(string_predicate)(string_dictionary) 1`] = `"Partial<Dictionary<string>>"`;
exports[`R_filter(string_predicate)(string_filterable) 1`] = `"Filterable<string>"`;
exports[`R_filter(string_predicate, string_array) 1`] = `"string[]"`;
exports[`R_filter(string_predicate, string_dictionary) 1`] = `"Dictionary<string>"`;
exports[`R_filter(string_predicate, string_dictionary) 1`] = `"Partial<Dictionary<string>>"`;
exports[`R_filter(string_predicate, string_filterable) 1`] = `"Filterable<string>"`;
4 changes: 2 additions & 2 deletions tests/__snapshots__/omit.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

exports[`R_omit([string])(object) 1`] = `"object"`;

exports[`R_omit([string])<Record<string, string>>(object) 1`] = `"Record<string, string>"`;
exports[`R_omit([string])(object) 2`] = `"object"`;

exports[`R_omit([string], object) 1`] = `"object"`;

exports[`R_omit<Record<string, string>>([string], object) 1`] = `"Record<string, string>"`;
exports[`R_omit([string], object) 2`] = `"object"`;
8 changes: 2 additions & 6 deletions tests/__snapshots__/partition.ts.snap
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`R_partition(number_to_boolean)(a_1_b_2_c_3) 1`] = `"[Record<string, number>, Record<string, number>]"`;
exports[`R_partition(number_to_boolean)(a_1_b_2_c_3) 1`] = `"[Partial<{ a: 1; b: 2; c: 3; }>, Partial<{ a: 1; b: 2; c: 3; }>]"`;

exports[`R_partition(number_to_boolean)(number_array) 1`] = `"[number[], number[]]"`;

exports[`R_partition(number_to_boolean)<'a', 'b' | 'c'>(a_1_b_2_c_3) 1`] = `"[Record<\\"a\\", number>, Record<\\"b\\" | \\"c\\", number>]"`;

exports[`R_partition(number_to_boolean, a_1_b_2_c_3) 1`] = `"[Record<string, number>, Record<string, number>]"`;
exports[`R_partition(number_to_boolean, a_1_b_2_c_3) 1`] = `"[Partial<{ a: 1; b: 2; c: 3; }>, Partial<{ a: 1; b: 2; c: 3; }>]"`;

exports[`R_partition(number_to_boolean, number_array) 1`] = `"[number[], number[]]"`;

exports[`R_partition<number, 'a', 'b' | 'c'>(number_to_boolean, a_1_b_2_c_3) 1`] = `"[Record<\\"a\\", number>, Record<\\"b\\" | \\"c\\", number>]"`;
8 changes: 4 additions & 4 deletions tests/__snapshots__/pick.ts.snap
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`R_pick([string])(object) 1`] = `"object"`;
exports[`R_pick(['a', 'c'])(a_1_b_2_c_3) 1`] = `"Partial<{ a: 1; b: 2; c: 3; }>"`;

exports[`R_pick([string])<Record<string, string>>(object) 1`] = `"Record<string, string>"`;
exports[`R_pick(['a', 'c'], a_1_b_2_c_3) 1`] = `"Pick<{ a: 1; b: 2; c: 3; }, \\"a\\" | \\"c\\">"`;

exports[`R_pick([string], object) 1`] = `"object"`;
exports[`R_pick([string])(object) 1`] = `"object"`;

exports[`R_pick<Record<string, string>>([string], object) 1`] = `"Record<string, string>"`;
exports[`R_pick([string], object) 1`] = `"object"`;
12 changes: 8 additions & 4 deletions tests/__snapshots__/pickAll.ts.snap
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`R_pickAll([string])(object) 1`] = `"object"`;
exports[`R_pickAll(['a', 'c', 'f'])(a_1_b_2_c_3) 1`] = `"Partial<{ a: 1; b: 2; c: 3; }>"`;

exports[`R_pickAll([string])<Record<string, string>>(object) 1`] = `"Record<string, string>"`;
exports[`R_pickAll(['a', 'c', 'f'], a_1_b_2_c_3) 1`] = `"Partial<{ a: 1; b: 2; c: 3; }>"`;

exports[`R_pickAll([string], object) 1`] = `"object"`;
exports[`R_pickAll(['a', 'c'])(a_1_b_2_c_3) 1`] = `"Partial<{ a: 1; b: 2; c: 3; }>"`;

exports[`R_pickAll(['a', 'c'], a_1_b_2_c_3) 1`] = `"Pick<{ a: 1; b: 2; c: 3; }, \\"a\\" | \\"c\\">"`;

exports[`R_pickAll<Record<string, string>>([string], object) 1`] = `"Record<string, string>"`;
exports[`R_pickAll([string])(object) 1`] = `"object"`;

exports[`R_pickAll([string], object) 1`] = `"object"`;
24 changes: 20 additions & 4 deletions tests/__snapshots__/pickBy.ts.snap
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`R_pickBy(string_string_object_to_boolean)(object) 1`] = `"object"`;
exports[`R_pickBy(number_string_object_to_boolean)(a_1_b_2_c_3) 1`] = `"Partial<Dictionary<number>>"`;
exports[`R_pickBy(string_string_object_to_boolean)<Record<string, string>>(object) 1`] = `"Record<string, string>"`;
exports[`R_pickBy(number_string_object_to_boolean)(string_number_record) 1`] = `"Partial<Dictionary<number>>"`;
exports[`R_pickBy(string_string_object_to_boolean, object) 1`] = `"object"`;
exports[`R_pickBy(number_string_object_to_boolean, a_1_b_2_c_3) 1`] = `"Partial<{ a: 1; b: 2; c: 3; }>"`;
exports[`R_pickBy<Record<string, string>>(string_string_object_to_boolean, object) 1`] = `"Record<string, string>"`;
exports[`R_pickBy(number_string_object_to_boolean, string_number_record) 1`] = `"Partial<Record<string, number>>"`;
exports[`R_pickBy(string_string_object_to_boolean)(a_1_b_2_c_3) 1`] = `
"Argument of type '{ a: 1; b: 2; c: 3; }' is not assignable to parameter of type 'Dictionary<string>'.
Property 'a' is incompatible with index signature.
Type '1' is not assignable to type 'string'."
`;
exports[`R_pickBy(string_string_object_to_boolean)(string_number_record) 1`] = `
"Argument of type 'Record<string, number>' is not assignable to parameter of type 'Dictionary<string>'.
Index signatures are incompatible.
Type 'number' is not assignable to type 'string'."
`;
exports[`R_pickBy(string_string_object_to_boolean, a_1_b_2_c_3) 1`] = `"Argument of type '{ a: 1; b: 2; c: 3; }' is not assignable to parameter of type 'Dictionary<string>'."`;
exports[`R_pickBy(string_string_object_to_boolean, string_number_record) 1`] = `"Argument of type 'Record<string, number>' is not assignable to parameter of type 'Dictionary<string>'."`;
Loading

0 comments on commit 9eaa862

Please sign in to comment.