mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Add typings for cometd's BinaryExtension (#36639)
* Add typings for cometd's BinaryExtension * Add BinaryExtension to the tests * Add BinaryExtension to tsconfig.json
This commit is contained in:
parent
2a1baba03d
commit
ed9e43134c
10
types/cometd/BinaryExtension/index.d.ts
vendored
Normal file
10
types/cometd/BinaryExtension/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import * as m from '..';
|
||||
|
||||
declare class BinaryExtension implements m.Extension {
|
||||
constructor();
|
||||
|
||||
incoming: m.Listener;
|
||||
outgoing: m.Listener;
|
||||
}
|
||||
|
||||
export default BinaryExtension;
|
||||
@ -1,6 +1,7 @@
|
||||
import { CometD, Listener, Message, SubscriptionHandle } from "cometd";
|
||||
import TimeSyncExtension from 'cometd/TimeSyncExtension';
|
||||
import AckExtension from 'cometd/AckExtension';
|
||||
import BinaryExtension from 'cometd/BinaryExtension';
|
||||
|
||||
const cometd = new CometD();
|
||||
|
||||
@ -14,6 +15,7 @@ cometd.configure({
|
||||
});
|
||||
|
||||
cometd.registerExtension("ack", new AckExtension());
|
||||
cometd.registerExtension("binary", new BinaryExtension());
|
||||
|
||||
const timesync = new TimeSyncExtension();
|
||||
cometd.registerExtension("timesync", timesync);
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
"index.d.ts",
|
||||
"cometd-tests.ts",
|
||||
"AckExtension/index.d.ts",
|
||||
"BinaryExtension/index.d.ts",
|
||||
"TimeSyncExtension/index.d.ts"
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user