Browse Source

fix: example of "waitAsync" utility

e22m4u 2 years ago
parent
commit
4afe61553a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/utils/wait-async.js

+ 2 - 2
src/utils/wait-async.js

@@ -5,7 +5,7 @@ import {InvalidArgumentError} from '@e22m4u/js-repository';
  *
  *
  * @example
  * @example
  * ```ts
  * ```ts
- * await wait(1000); // 1sec
+ * await waitAsync(1000); // 1sec
  * ```
  * ```
  *
  *
  * @param {number} ms Milliseconds
  * @param {number} ms Milliseconds
@@ -14,7 +14,7 @@ import {InvalidArgumentError} from '@e22m4u/js-repository';
 export function waitAsync(ms) {
 export function waitAsync(ms) {
   if (typeof ms !== 'number')
   if (typeof ms !== 'number')
     throw new InvalidArgumentError(
     throw new InvalidArgumentError(
-      'The first argument of "waitAsync" must be' + ' a Number, but %v given.',
+      'The first argument of "waitAsync" must be a Number, but %v given.',
       ms,
       ms,
     );
     );
   return new Promise(r => setTimeout(() => r(), ms));
   return new Promise(r => setTimeout(() => r(), ms));