Skip to content

Is there Typescript support? #145

Closed
Closed
@Luis-Palacios

Description

@Luis-Palacios

I noticed that a type definition exist and I have read through some conversations on issues and PR that suggest some attempts have been done in order to support typescript however I'm currently trying to use it and I'm running into multiple errors.

I would like to know if currently, this package type definition is correct because it does not seem to be

I run into this error if I try the basic example on
`"Type '{ value: string; label: string; children: { value: string; label: string; }[]; }[]' is not assignable to type 'Node[]'.
Type '{ value: string; label: string; children: { value: string; label: string; }[]; }' is not assignable to type 'Node'.
Types of property 'label' are incompatible.

image

If I change the way I import the package to const CheckboxTree = require('react-checkbox-tree'); then it works but without any type support

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions