mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-03 03:29:30 +08:00
21 lines
535 B
Text
21 lines
535 B
Text
/*
|
|
Copyright 2019 Google LLC
|
|
Use of this source code is governed by an MIT-style
|
|
license that can be found in the LICENSE file or at
|
|
https://opensource.org/licenses/MIT.
|
|
*/
|
|
|
|
import '../_version.js';
|
|
|
|
/**
|
|
* Returns a promise that resolves and the passed number of milliseconds.
|
|
* This utility is an async/await-friendly version of `setTimeout`.
|
|
*
|
|
* @param {number} ms
|
|
* @return {Promise}
|
|
* @private
|
|
*/
|
|
|
|
export function timeout(ms: number): Promise<unknown> {
|
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
}
|