@enonic-types/lib-websocket 0.1.0 → 7.11.0-B1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -5
  2. package/websocket.d.ts +57 -57
package/package.json CHANGED
@@ -1,15 +1,11 @@
1
1
  {
2
2
  "name": "@enonic-types/lib-websocket",
3
- "version": "0.1.0",
3
+ "version": "7.11.0-B1",
4
4
  "description": "Type definitions for lib-websocket.",
5
5
  "types": "websocket.d.ts",
6
6
  "files": [
7
7
  "websocket.d.ts"
8
8
  ],
9
- "scripts": {
10
- "pre": "npm run --prefix ../ pre",
11
- "packlist": "npx npm-packlist"
12
- },
13
9
  "repository": {
14
10
  "type": "git",
15
11
  "url": "git+https://github.com/enonic/xp.git#master"
package/websocket.d.ts CHANGED
@@ -1,57 +1,57 @@
1
- /**
2
- * Websocket functions.
3
- *
4
- * @example
5
- * var webSocketLib = require('/lib/xp/websocket');
6
- *
7
- * @module websocket
8
- */
9
- declare global {
10
- interface XpLibraries {
11
- '/lib/xp/websocket': typeof import('./websocket');
12
- }
13
- }
14
- /**
15
- * Add an id to a socket group.
16
- *
17
- * @example-ref examples/websocket/addToGroup.js
18
- *
19
- * @param {string} group Group name.
20
- * @param {string} id Socket id.
21
- */
22
- export declare function addToGroup(group: string, id: string): void;
23
- /**
24
- * Remove an id from a socket group.
25
- *
26
- * @example-ref examples/websocket/removeFromGroup.js
27
- *
28
- * @param {string} group Group name.
29
- * @param {string} id Socket id.
30
- */
31
- export declare function removeFromGroup(group: string, id: string): void;
32
- /**
33
- * Send message directly to a socket id.
34
- *
35
- * @example-ref examples/websocket/send.js
36
- *
37
- * @param {string} id Socket id.
38
- * @param {string} message Message as text.
39
- */
40
- export declare function send(id: string, message: string): void;
41
- /**
42
- * Send message to all sockets in group.
43
- *
44
- * @example-ref examples/websocket/sendToGroup.js
45
- *
46
- * @param {string} group Group name.
47
- * @param {string} message Message as text.
48
- */
49
- export declare function sendToGroup(group: string, message: string): void;
50
- /**
51
- * Get number of all sockets in group.
52
- *
53
- * @example-ref examples/websocket/addToGroup.js
54
- *
55
- * @param {string} group Group name.
56
- */
57
- export declare function getGroupSize(group: string): number;
1
+ /**
2
+ * Websocket functions.
3
+ *
4
+ * @example
5
+ * var webSocketLib = require('/lib/xp/websocket');
6
+ *
7
+ * @module websocket
8
+ */
9
+ declare global {
10
+ interface XpLibraries {
11
+ '/lib/xp/websocket': typeof import('./websocket');
12
+ }
13
+ }
14
+ /**
15
+ * Add an id to a socket group.
16
+ *
17
+ * @example-ref examples/websocket/addToGroup.js
18
+ *
19
+ * @param {string} group Group name.
20
+ * @param {string} id Socket id.
21
+ */
22
+ export declare function addToGroup(group: string, id: string): void;
23
+ /**
24
+ * Remove an id from a socket group.
25
+ *
26
+ * @example-ref examples/websocket/removeFromGroup.js
27
+ *
28
+ * @param {string} group Group name.
29
+ * @param {string} id Socket id.
30
+ */
31
+ export declare function removeFromGroup(group: string, id: string): void;
32
+ /**
33
+ * Send message directly to a socket id.
34
+ *
35
+ * @example-ref examples/websocket/send.js
36
+ *
37
+ * @param {string} id Socket id.
38
+ * @param {string} message Message as text.
39
+ */
40
+ export declare function send(id: string, message: string): void;
41
+ /**
42
+ * Send message to all sockets in group.
43
+ *
44
+ * @example-ref examples/websocket/sendToGroup.js
45
+ *
46
+ * @param {string} group Group name.
47
+ * @param {string} message Message as text.
48
+ */
49
+ export declare function sendToGroup(group: string, message: string): void;
50
+ /**
51
+ * Get number of all sockets in group.
52
+ *
53
+ * @example-ref examples/websocket/addToGroup.js
54
+ *
55
+ * @param {string} group Group name.
56
+ */
57
+ export declare function getGroupSize(group: string): number;