Skip to content

Commit

Permalink
Ensure tests produce same results before and after TS DefinitelyTyped…
Browse files Browse the repository at this point in the history
  • Loading branch information
ahejlsberg authored Jul 9, 2019
1 parent 575279d commit a666fed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions types/storage-helper/storage-helper-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ storageHelper.setItem('foo', 'bas', false);
storageHelper.getItem('foo'); // $ExpectType string | null
storageHelper.getItem('foo', false); // $ExpectType string | null
storageHelper.getItem('foo', undefined); // $ExpectType string | null
storageHelper.getItem('foo', false, Boolean() ? 1 : undefined); // $ExpectType string | number | null
storageHelper.getItem('foo', false, 1); // $ExpectType string | number | null
storageHelper.getItem('foo', false, Boolean() ? 1 + 1 : undefined); // $ExpectType string | number | null
storageHelper.getItem('foo', false, 1 + 1); // $ExpectType string | number | null
storageHelper.getItem('foo', false, undefined); // $ExpectType string | null
storageHelper.getItem('foo', true); // $ExpectType any
storageHelper.getItem('foo', true, 1); // $ExpectType any
Expand Down
2 changes: 1 addition & 1 deletion types/wordpress__hooks/wordpress__hooks-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ hooks.filters;
firstFilter('foo', 'other', 'args', 34, 'blah', true);

// $ExpectType boolean
firstFilter(true);
firstFilter(1 < 2);

// $ExpectType number
firstFilter(123);
Expand Down

0 comments on commit a666fed

Please sign in to comment.