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

Return type error with useTweaks #43

Closed
lourd opened this issue Feb 11, 2021 · 2 comments
Closed

Return type error with useTweaks #43

lourd opened this issue Feb 11, 2021 · 2 comments

Comments

@lourd
Copy link

lourd commented Feb 11, 2021

When using the useTweaks hook, I'm getting an error about the return types. The return type looks to be an object with a single key that is an empty string?

const {
    numCirclesPerGroup,
    circleGap,
    innerCircleRadius,
    numGroups,
  } = useTweaks({
    numCirclesPerGroup: { value: 12, min: 1, max: 40, step: 1 },
    circleGap: { value: 2, min: 0, max: 100, step: 1 },
    innerCircleRadius: { value: 20, min: 1, max: 100, step: 1 },
    numGroups: { value: 6, min: 2, max: 90, step: 1 },
  })
// Property 'innerCircleRadius' does not exist on type '{ "": { numCirclesPerGroup: ....

See this sandbox https://codesandbox.io/s/jovial-lamport-8c4u3?file=/src/App.tsx

@unphased
Copy link

unphased commented Mar 13, 2021

Pretty sure now that if you revert your project to tweakpane 1.5.8 or earlier it goes away. I think i found out that the way to use codesandbox to verify this is to fork it, set the dependency versions and then reload the page. I get the error on 1.5.9, but not 1.5.8, 7, or 6.

cocopon added a commit that referenced this issue Oct 1, 2021
@cocopon cocopon mentioned this issue Oct 1, 2021
@cocopon
Copy link
Collaborator

cocopon commented Oct 1, 2021

Fixed in 0.3.2-alpha.0.

@cocopon cocopon closed this as completed Oct 1, 2021
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

No branches or pull requests

3 participants