mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-10 22:44:43 +08:00
[nes] Add test/socket.ts
This commit is contained in:
16
types/nes/test/socket.ts
Normal file
16
types/nes/test/socket.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// from https://github.com/hapijs/nes/blob/v6.4.3/lib/socket.js
|
||||
|
||||
import Nes = require('nes');
|
||||
|
||||
const socket: Nes.Socket = undefined;
|
||||
|
||||
const cb = () => { };
|
||||
socket.disconnect(cb);
|
||||
const s: string = socket.id;
|
||||
const o: Object = socket.app;
|
||||
const auth: Nes.SocketAuthObject = socket.auth;
|
||||
|
||||
const cb2 = (err?: any) => { };
|
||||
socket.send('message', (err?: any) => { });
|
||||
socket.publish('path', 'message', cb2);
|
||||
socket.revoke('path', 'message', cb2);
|
||||
@@ -26,9 +26,10 @@
|
||||
"test/route-authentication-server.ts",
|
||||
"test/route-invocation-client.ts",
|
||||
"test/route-invocation-server.ts",
|
||||
"test/socket.ts",
|
||||
"test/subscription-filter-client.ts",
|
||||
"test/subscription-filter-server.ts",
|
||||
"test/subscriptions-client.ts",
|
||||
"test/subscriptions-server.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user