Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions types/airbnb-prop-types/airbnb-prop-types-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ AirbnbPropTypes.nonNegativeNumber();
// $ExpectType Requireable<string>
AirbnbPropTypes.numericString();

// $ExpectType Requireable<{}>
AirbnbPropTypes.object();
// $ExpectType Requireable<object>
const props: PropTypes.Requireable<object> = AirbnbPropTypes.object();
// $ExpectType Requireable<{ foo: string; }>
AirbnbPropTypes.object<{ foo: string }>();

Expand Down
2 changes: 1 addition & 1 deletion types/lodash/lodash-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4989,7 +4989,7 @@ fp.now(); // $ExpectType number
_.create(prototype, properties); // $ExpectType { a: number; } & { b: string; }
_(prototype).create(properties); // $ExpectType LoDashImplicitWrapper<{ a: number; } & { b: string; }>
_.chain(prototype).create(properties); // $ExpectType LoDashExplicitWrapper<{ a: number; } & { b: string; }>
fp.create(prototype); // $ExpectType { a: number; }
const combined: { a: number } & object = fp.create(prototype);
}

// _.defaultsDeep
Expand Down
4 changes: 1 addition & 3 deletions types/react/test/tsx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,7 @@ const Memoized5 = React.memo<{ test: boolean }>(

<Memoized5 test/>;

// for some reason the ExpectType doesn't work if the type is namespaced
// $ExpectType NamedExoticComponent<{}>
const Memoized6 = React.memo(props => null);
const Memoized6: React.NamedExoticComponent<object> = React.memo(props => null);
<Memoized6/>;
// $ExpectError
<Memoized6 foo/>;
Expand Down