Add type annotations

This commit is contained in:
syuilo 2019-04-18 14:29:17 +09:00
parent 653b8f6352
commit 683e5b6abe
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
2 changed files with 3 additions and 3 deletions

View file

@ -76,7 +76,7 @@ export const uploadFile = (user: any, path?: string): Promise<any> => new Promis
});
});
export function connectStream(user: any, channel: string, listener: any, params?: any): Promise<WebSocket> {
export function connectStream(user: any, channel: string, listener: (message: Record<string, any>) => any, params?: any): Promise<WebSocket> {
return new Promise((res, rej) => {
const ws = new WebSocket(`ws://localhost/streaming?i=${user.token}`);