@cloudpss/ubrpc 0.4.11 → 0.4.13

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.
package/tests/server.js CHANGED
@@ -5,13 +5,17 @@ import { WebSocketServer } from 'ws';
5
5
  const a = {
6
6
  greetings: 'Hello, ',
7
7
  /**
8
- *
9
- * @param {string} name
10
- * @returns {Promise<string>}
8
+ * @inheritdoc
9
+ * @param {string} name 名字
11
10
  */
12
11
  async hello(name) {
12
+ await Promise.resolve();
13
13
  return `${this.greetings}${name}`;
14
14
  },
15
+ /**
16
+ * @inheritdoc
17
+ * @param {number | undefined} i 间隔
18
+ */
15
19
  timer(i) {
16
20
  return interval(i).pipe(
17
21
  take(10),
@@ -35,6 +39,7 @@ const server = new WebSocketServer({
35
39
  port: 8090,
36
40
  path: '/',
37
41
  });
42
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
38
43
  server.on('connection', async (socket) => {
39
44
  try {
40
45
  await rpc.connect(socket);