You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When instantiating a generic base type in an extends clause, we allow generic type references to miss type parameters. for that we use the defaults if available (see #14907) then fill them with any.
React components now have generic defaults for props and state to be {}. this breaks the JS experience making all React components in a js file property-less. we should fall on the permissive side in a .js file, and special case {} to be treated as any.
weswigham
changed the title
Treat generic defaults in an extends clause in a .js file as any
Treat empty curly generic defaults in an extends clause in a .js file as anyNov 13, 2017
When instantiating a generic base type in an extends clause, we allow generic type references to miss type parameters. for that we use the defaults if available (see #14907) then fill them with
any
.React components now have generic defaults for props and state to be
{}
. this breaks the JS experience making all React components in a js file property-less. we should fall on the permissive side in a .js file, and special case{}
to be treated asany
.Reported originally in #14558
The text was updated successfully, but these errors were encountered: