Skip to content

Socket.io client-side d.ts #9

Open
@lhk

Description

@lhk

Hi, I've created a .d.ts for client-side usage of socket.io. It's very short, but it works for me.

Here's the code:

declare var io : {
connect(url: string): Socket;
}
interface Socket {
on(event: string, callback: (data: any) => void );
emit(event: string, data: any);
}

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