Skip to content

some updates for 2021 - #1

Draft
brody2consult wants to merge 17 commits into
suguru03:masterfrom
brodysoft:some-updates
Draft

some updates for 2021#1
brody2consult wants to merge 17 commits into
suguru03:masterfrom
brodysoft:some-updates

Conversation

@brody2consult

Copy link
Copy Markdown
  • update HOC type of branch() to work with TypeScript post-2.x
  • updatejest & ts-jest, update the configuration, and update some imports in the test code
  • add @ts-ignore & TODO comments
  • update some more dependencies

Some TODO items:

  • resolve type issues as discussed in the TODO comments
  • switch from tslint with eslint, ideally with "Standard JS" linting rules & Prettier code formatting
  • update remaining dependencies

Christopher J. Brody added 17 commits February 4, 2021 17:30
and update imports as needed
and add a @ts-ignore / TODO comment to:

src/__tests__/withHanders-test.tsx
- @types/enzyme -> ^3.10.8
- @types/jest -> ^26.0.20
- @types/recompose -> ^0.30.7
- enzyme -> ^3.11.0
- enzyme-adapter-react-16 -> ^1.15.6
- react -> ~16.12.0
- react-dom -> ~16.12.0
Note that formatting of the build by Prettier 1.17.1 does not seem to
be changed by this update.
to resolve a type issue with @types/react post-16.4 update:

error TS2322: Type 'ComponentClass<OuterProps>' is not assignable to type 'ComponentClass<OuterProps, any>'.

@brody2consult brody2consult left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Some code & test TODO comments

Comment thread src/Recomposer.tsx
Comment on lines +60 to 62
// TODO resolve type issue here with @types/react post-16.4 update:
// error TS2322: Type 'ComponentClass<OuterProps>' is not assignable to type 'ComponentClass<OuterProps, any>'.
return compose<InnerProps, OuterProps>(...this.opts)(Component);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I would like to get the type issue resolved here with the @types/react post-16.4 update.

Comment thread src/Recomposer.tsx
trueEnhancer:
| ComponentEnhancer<InnerProps, NextProps>
| InferableComponentEnhancer<NextProps>
| InferableComponentEnhancer<{}>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think it would be ideal to get recompose to allow InferableComponentEnhancer<NextProps> type option in its exported .d.ts.

Comment thread src/Recomposer.tsx
falseEnhancer?:
| ComponentEnhancer<InnerProps, NextProps>
| InferableComponentEnhancer<NextProps>
| InferableComponentEnhancer<{}>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ditto:

I think it would be ideal to get recompose to allow InferableComponentEnhancer<NextProps> type option in its exported .d.ts.

Comment on lines +56 to 57
// @ts-ignore - TODO:
expect(component.firstCall.args[0].handler).toBe(component.secondCall.args[0].handler);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I would like to get this TODO resolved at some point.

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.

1 participant