Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
fpagnoux committed Aug 19, 2020
1 parent 1a4f5e4 commit ea299a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions types/lodash/lodash-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5661,10 +5661,10 @@ fp.now(); // $ExpectType number
const literalsArray: Array<"a" | "b"> = ["a", "b"];
const roLiteralsArray: ReadonlyArray<"a" | "b"> = literalsArray;

_.pick(obj1, "a"); // $ExpectType PartialDeep<AbcObject>
_.pick(obj1, 0, "a"); // $ExpectType PartialDeep<AbcObject>
_.pick(obj1, ["b", 1], 0, "a"); // $ExpectType PartialDeep<AbcObject>
_.pick(obj1, readonlyArray); // $ExpectType PartialDeep<AbcObject>
_.pick(obj1, "a"); // $ExpectType { a?: number | undefined; b?: string | undefined; c?: boolean | undefined; }
_.pick(obj1, 0, "a"); // $ExpectType { a?: number | undefined; b?: string | undefined; c?: boolean | undefined; }
_.pick(obj1, ["b", 1], 0, "a"); // $ExpectType { a?: number | undefined; b?: string | undefined; c?: boolean | undefined; }
_.pick(obj1, readonlyArray); // $ExpectType { a?: number | undefined; b?: string | undefined; c?: boolean | undefined; }
_.pick(obj2, "a", "b"); // $ExpectType Pick<AbcObject, "a" | "b">
// We can't use ExpectType here because typescript keeps changing what order the types appear.
let result1: Pick<AbcObject, "a" | "b">;
Expand Down

0 comments on commit ea299a4

Please sign in to comment.