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

TreeTableProps: type error in treetable.d.ts file #2881

Closed
Vahn84 opened this issue May 12, 2022 · 3 comments · Fixed by #2883
Closed

TreeTableProps: type error in treetable.d.ts file #2881

Vahn84 opened this issue May 12, 2022 · 3 comments · Fixed by #2883
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component. Typescript Issue or pull request is *only* related to TypeScript definition
Milestone

Comments

@Vahn84
Copy link

Vahn84 commented May 12, 2022

Describe the bug

Compiler fails with the following error

Interface 'TreeTableProps' incorrectly extends interface 'Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLDivElement>, HTMLDivElement>, "onContextMenu" | "onSelect" | "ref">'. Types of property 'value' are incompatible. Type 'TreeNode[]' is not assignable to type 'string | number | readonly string[]'. Type 'TreeNode[]' is not assignable to type 'readonly string[]'. Type 'TreeNode' is not assignable to type 'string'.ts(2430)

image

This is the value parameter described inside the react interface that the treetableprops interface is extending
image

I released an hotfix with the 'skipLibCheck' set to true...but that's not really something i'd like to do

Reproducer

No response

PrimeReact version

8.0.1

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No type errors when compiling

@Vahn84 Vahn84 added the Type: Bug Issue contains a defect related to a specific component. label May 12, 2022
@melloware melloware self-assigned this May 12, 2022
@melloware melloware added Typescript Issue or pull request is *only* related to TypeScript definition and removed Type: Bug Issue contains a defect related to a specific component. labels May 12, 2022
@melloware melloware added this to the 8.2.0 milestone May 12, 2022
melloware added a commit to melloware/primereact that referenced this issue May 12, 2022
@melloware
Copy link
Member

Good catch thanks for reporting!

@Vahn84
Copy link
Author

Vahn84 commented May 12, 2022

Thanks for the fix! Can you tell me when it will be released?

@melloware
Copy link
Member

Sorry I don't work for PrimeTek so I don't know the exact release schedule but it looks like they do about Monthly releases...

@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label May 19, 2022
@mertsincan mertsincan modified the milestones: 8.2.0, 8.2.1 May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component. Typescript Issue or pull request is *only* related to TypeScript definition
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants