Skip to content

RFC: Add generic type to useFlags #139

Open
@jamiehaywood

Description

@jamiehaywood

Is your feature request related to a problem? Please describe.
It would be great to get intellisense when destructuring the flags from useFlags

Describe the solution you'd like
To pass a generic to the useFlags hook:

interface Flags {
  featureFlagOne: boolean
}

const { featureFlagOne } = useFlags<Flags>()

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