Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

7.1 version breaks TypeScript projects by declaring optional properties as required #146

@ngbrown

Description

@ngbrown

There is no v7.1 tag in this repository, but it is appearing as latest on npm.

Once I updated my project to that version, I am getting the following error:

TypeScript error in D:/dev/xxxx.tsx(64,10):
Property 'translate' is missing in type '{ onFocus: (event: {}) => void; type: string; className: string; rows: number; }' but required in type 'Pick<HTMLProps<HT
MLTextAreaElement>, "default" | "key" | "value" | "is" | "cite" | "data" | "form" | "label" | "span" | "style" | "summary" | "title" | ... 347 more ... | "wmode">
'.  TS2741

when being used like this:

        <TextareaAutosize
          type="text"
          className="form-control"
          rows={4}
        />

Even adding a translate={'no'} property doesn't resolve the error.

Going back to react-autosize-textarea@7.0.0 (without the translate property) also resolves the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions