mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-24 17:52:45 +00:00
Add server id property and persistence namespace
This commit is contained in:
parent
7a15941349
commit
b6cf2fda64
14
types/mosca/index.d.ts
vendored
14
types/mosca/index.d.ts
vendored
@ -1,9 +1,11 @@
|
||||
// Type definitions for mosca 2.8
|
||||
// Project: https://github.com/mcollina/mosca
|
||||
// Definitions by: Joao Gabriel Gouveia <https://github.com/GabrielGouv>
|
||||
// Jerray Fu <https://github.com/jerray>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export class Server {
|
||||
id: string;
|
||||
opts: any;
|
||||
modernOpts: any;
|
||||
clients: any;
|
||||
@ -83,3 +85,15 @@ export interface Message {
|
||||
qos: number;
|
||||
retain: boolean;
|
||||
}
|
||||
|
||||
export namespace persistence {
|
||||
interface Persistence {
|
||||
wire(server: Server): void;
|
||||
}
|
||||
type FactoryFunc = (options: { [key: string]: any }) => Persistence;
|
||||
|
||||
const Redis: FactoryFunc;
|
||||
const Mongo: FactoryFunc;
|
||||
const LevelUp: FactoryFunc;
|
||||
const Memory: FactoryFunc;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user