Skip to content

Commit fbf8db9

Browse files
committed
update type declaration to reflect new module version
1 parent 3c9efbb commit fbf8db9

1 file changed

Lines changed: 16 additions & 13 deletions

File tree

index.d.ts

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@
88

99
// TODO: change all the occurences where we use CbCallback<any> to supply the actual type that is returned
1010

11+
declare module 'clearblade-js-client' {
12+
export interface ClearBlade {
13+
new (): IClearBlade;
14+
15+
MESSAGING_QOS_AT_MOST_ONCE: MessagingQOS.MESSAGING_QOS_AT_MOST_ONCE;
16+
MESSAGING_QOS_AT_LEAST_ONCE: MessagingQOS.MESSAGING_QOS_AT_LEAST_ONCE;
17+
MESSAGING_QOS_EXACTLY_ONCE: MessagingQOS.MESSAGING_QOS_EXACTLY_ONCE;
18+
19+
request(options: RequestOptions, callback: CbCallback<any>): void;
20+
getMessageTopic(
21+
destinationName: string,
22+
callbackDict: CbDictionary<string, Function>
23+
): string;
24+
}
25+
}
26+
1127
declare enum MessagingQOS {
1228
MESSAGING_QOS_AT_MOST_ONCE = 0,
1329
MESSAGING_QOS_AT_LEAST_ONCE = 1,
@@ -70,19 +86,6 @@ interface InvocationContext {
7086
}
7187

7288
type CbDictionary<K extends string, T> = { [P in K]?: T };
73-
interface IClearBladeGlobal {
74-
new (): IClearBlade;
75-
76-
MESSAGING_QOS_AT_MOST_ONCE: MessagingQOS.MESSAGING_QOS_AT_MOST_ONCE;
77-
MESSAGING_QOS_AT_LEAST_ONCE: MessagingQOS.MESSAGING_QOS_AT_LEAST_ONCE;
78-
MESSAGING_QOS_EXACTLY_ONCE: MessagingQOS.MESSAGING_QOS_EXACTLY_ONCE;
79-
80-
request(options: RequestOptions, callback: CbCallback<any>): void;
81-
getMessageTopic(
82-
destinationName: string,
83-
callbackDict: CbDictionary<string, Function>
84-
): string;
85-
}
8689

8790
interface IClearBlade {
8891
systemKey: string;

0 commit comments

Comments
 (0)