Skip to content

Improve typings [v3] #4432

Closed
Closed
@layershifter

Description

@layershifter

Bug Report

Steps

While v3 supports native ref forwarding, typings should be updated to reflect this.

Expected Result

Typings work as expected.

Actual Result

TS2769: No overload matches this call.   Overload 1 of 2, '(props: ButtonProps | Readonly<ButtonProps>): Button', gave the following error.     Type 'MutableRefObject<HTMLButtonElement | undefined>' is not assignable to type 'LegacyRef<Button> | undefined'.       Type 'MutableRefObject<HTMLButtonElement | undefined>' is not assignable to type 'RefObject<Button>'.
Parameter 'el' implicitly has an 'any' type, but a better type may be inferred from usage.ts(7044)

Version

3.0.0-beta.0

Testcase

https://codesandbox.io/s/semantic-ui-example-forked-9spw8n?file=/example.tsx

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions