Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket.io client-side d.ts #9

Open
lhk opened this issue Dec 30, 2012 · 1 comment
Open

Socket.io client-side d.ts #9

lhk opened this issue Dec 30, 2012 · 1 comment

Comments

@lhk
Copy link

lhk commented Dec 30, 2012

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);
}

@soywiz
Copy link
Member

soywiz commented Dec 30, 2012

Can you perform a pull request so I can merge it? Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants