DefinitelyTyped icon indicating copy to clipboard operation
DefinitelyTyped copied to clipboard

Confusing names of interfaces for SlickGrid event args

Open Koloto opened this issue 11 years ago • 2 comments

Problem

Currently Slick module declares class EventData, which is used to simulate a DOM/jQuery event object:

    export class EventData {
        constructor();
        public stopPropagation(): void;
        public isPropagationStopped(): boolean;
        public stopImmediatePropagation(): void;
        public isImmediatePropagationStopped(): boolean;
    }

Also there are a lot of interfaces with the names like On<Name>EventData, e.g.

    export interface OnClickEventData {
        row: number;
        cell: number;
    }

EventData and On<Name>EventData describe different things: DOM event and SlickGrid event. But they have similar names and it confuse a lot.

Proposal

The SlickGrid event object is usually named args (see Event.notify for example). So it's logically to rename On<Name>EventData to On<Name>EventArgs.

I can create a PR, but it will be a breaking change. So I want to discuss it with other contributors first. @jbaldwin, @ljl, @Diullei, @vvakame, @derekcicerone, @benjaminjackman, @Igorbek, @Bartvds, @gscshoyru, @slozier, @styfle, @payojbaral, @ryiwamoto, @catbusstop what do you think?

Koloto avatar Sep 08 '15 13:09 Koloto

I'm not user of slickgrid now. You should doing to want. :wink:

vvakame avatar Sep 08 '15 17:09 vvakame

@Koloto It sounds like this is simply a refactor due to a naming convention. I'm okay with the change.

styfle avatar Sep 08 '15 19:09 styfle