Skip to content

ReactChildren causing issues in react-virtualized for TS 2.3.2 #16415

Closed

Description

@joewood

TypeScript 2.3.2 adds more strict type checks around ReactChildren. Components with a declared children property of type ReactChildren is now failing against Element arrays. The react-virtualized package has a Table component that explicitly types the children property as ReactChildren. This causes TypeScript compiler errors with a Column element array. Removing the children property fixes the issue.

Author: @kaoDev

Activity

  1. kaoDev commented on May 9, 2017

    @kaoDev
    Contributor

    I will have a look into this, but could take a few days till I have time.
    The issue should be connected to microsoft/TypeScript#13618

  2. joewood commented on May 9, 2017

    @joewood
    Author

    No problem, thanks @kaoDev. This is definitely new in TypeScript, as I had similar issues with my components. I think the children type should be Column for Table (according to that link above). Although, it may be easier to just remove the children property and leave it as the default.

  3. kaoDev commented on May 14, 2017

    @kaoDev
    Contributor

    PR is submitted, together with an update to version 9.7 #16515

  4. orta commented on Jun 7, 2021

    @orta
    Collaborator

    Hi thread, we're moving DefinitelyTyped to use GitHub Discussions for conversations the @types modules in DefinitelyTyped.

    To help with the transition, we're closing all issues which haven't had activity in the last 6 months, which includes this issue. If you think closing this issue is a mistake, please pop into the TypeScript Community Discord and mention the issue in the definitely-typed channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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