Skip to content

Incorrect definition of SyntheticEvent<T> in types-2.0/react/index.d.ts #11041

Closed

Description

@bogusfocused
    interface SyntheticEvent<T> {
        bubbles: boolean;
        currentTarget: EventTarget;
        cancelable: boolean;
        defaultPrevented: boolean;
        eventPhase: number;
        isTrusted: boolean;
        nativeEvent: Event;
        preventDefault(): void;
        isDefaultPrevented(): boolean;
        stopPropagation(): void;
        isPropagationStopped(): boolean;
        persist(): void;
        target: EventTarget;
        timeStamp: Date;
        type: string;
    }

should have T with the target

    interface SyntheticEvent<T> {
        bubbles: boolean;
        currentTarget: EventTarget;
        cancelable: boolean;
        defaultPrevented: boolean;
        eventPhase: number;
        isTrusted: boolean;
        nativeEvent: Event;
        preventDefault(): void;
        isDefaultPrevented(): boolean;
        stopPropagation(): void;
        isPropagationStopped(): boolean;
        persist(): void;
        target: EventTarget & T;
        timeStamp: Date;
        type: string;
    }

Activity

  1. phiresky commented on Sep 5, 2016

    @phiresky
    Contributor

    Huh. Looks like that was somehow wrongly overwritten by a merge? My commit looked like this: 084926e

  2. bogusfocused commented on Sep 6, 2016

    @bogusfocused
    Author

    How can we fix it?

  3. phiresky commented on Sep 6, 2016

    @phiresky
    Contributor

    You can submit a pull request. Best also check if any other changes were
    reverted, or why it happened

    On Sep 6, 2016 08:12, "Rohit" [email protected] wrote:

    How can we fix it?

    —
    You are receiving this because you were mentioned.
    Reply to this email directly, view it on GitHub
    #11041 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe-auth/ACMnYQLtvLjyQcrEwVQVjS5KTF3bB8fEks5qnQRNgaJpZM4J1R3Y
    .

  4. phiresky commented on Sep 7, 2016

    @phiresky
    Contributor

    Another relevant commit is a13fa7a @joshaber

  5. phiresky commented on Sep 7, 2016

    @phiresky
    Contributor

    See, #10811 , #10784 . Looks like this issue can be closed.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions