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

Typings for recompose return "does not exist on type value" error #28322

Closed
ravecat opened this issue Nov 2, 2018 · 1 comment
Closed

Typings for recompose return "does not exist on type value" error #28322

ravecat opened this issue Nov 2, 2018 · 1 comment
Assignees
Labels
Bug A bug in TypeScript Domain: Contextual Types The issue relates to contextual types

Comments

@ravecat
Copy link

ravecat commented Nov 2, 2018

TypeScript Version: 3.2.0-dev.20181102

Search Terms:

  • typescript does not exist on type compose
  • typescript does not exist on type compose hocs

Code

import { withState, withHandlers, compose } from "recompose";
import { withTheme } from "common/helpers";
import Collapse from "./Collapse";

export default compose(
  withTheme,
  withState("condition", "handleClick", false),
  withHandlers({
    handleClick: ({ handleClick }) => () =>
      handleClick((condition: boolean) => !condition)
  })
)(Collapse);.

Expected behavior:
Build project without error

Actual behavior:
Get error

[!] (rpt2 plugin) Error: /home/max/project/styled-components-toolbox/src/components/Collapse/index.ts(7,29): semantic error TS2339 Property 'handleClick' does not exist on type '{}'.
src/components/Collapse/index.ts

Playground Link:
Branch in repo https://github.com/ravecat/styled-components-toolbox/tree/feature/update-rollup

  1. Clone repo https://github.com/ravecat/styled-components-toolbox.git
    git clone https://github.com/ravecat/styled-components-toolbox.git
  2. Checkout on branch
    git checkout -b feature/update-rollup origin/feature/update-rollup
  3. Run console command yarn
  4. Run another console command yarn build

Related Issues:
acdlite/recompose#231

@weswigham weswigham added Bug A bug in TypeScript Needs Investigation This issue needs a team member to investigate its status. Domain: Contextual Types The issue relates to contextual types labels Nov 3, 2018
@sheetalkamat sheetalkamat added this to the TypeScript 3.3 milestone Dec 8, 2018
@ahejlsberg
Copy link
Member

@ravecat I'm closing this as the repro instructions don't work and the branches mentioned above don't appear to exist. Please open a new issue if you think there is still a problem.

@RyanCavanaugh RyanCavanaugh removed the Needs Investigation This issue needs a team member to investigate its status. label Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Contextual Types The issue relates to contextual types
Projects
None yet
Development

No branches or pull requests

5 participants