Skip to content

Return type error with useTweaks #43

@lourd

Description

@lourd

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions