Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFR] Upgrade types #3463

Merged
merged 3 commits into from Jul 26, 2019
Merged

[RFR] Upgrade types #3463

merged 3 commits into from Jul 26, 2019

Conversation

fzaninotto
Copy link
Member

@fzaninotto fzaninotto commented Jul 26, 2019

  • Introduce @types/react-redux
  • Run yarn upgrade to fix errors due to duplicated type dependencies
  • Fix errors revealed by updated types

Supersedes #3065
May fix #2978

@fzaninotto fzaninotto added this to the 3.0.0 milestone Jul 26, 2019
@@ -10,7 +10,7 @@ export interface DefaultValueProps extends InputProps {
initializeForm: typeof initializeFormAction;
}

export class DefaultValueView extends Component<DefaultValueProps> {
export class DefaultValueView extends Component<any> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because the connect call at the end of the file triggers this cryptic TypeScript error:

Argument of type 'typeof DefaultValueView' is not assignable to parameter of type 'ComponentType<never>'.
  Type 'typeof DefaultValueView' is not assignable to type 'ComponentClass<never, any>'.
    Types of property 'propTypes' are incompatible.
      Type '{ decoratedComponent: Requireable<ReactElementLike | ((...args: any[]) => any)>; defaultValue: Requireable<any>; initializeForm: Validator<(...args: any[]) => any>; input: Requireable<object>; source: Requireable<...>; validate: Requireable<...>; }' is not assignable to type 'never'.ts(2345)

And I don't know how to silence it.

packages/ra-ui-materialui/src/auth/Logout.tsx Outdated Show resolved Hide resolved
packages/ra-ui-materialui/src/layout/CardActions.tsx Outdated Show resolved Hide resolved
@djhi djhi merged commit db1571a into next Jul 26, 2019
@djhi djhi deleted the better-types branch July 26, 2019 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants