mirror of
https://github.com/actions/typescript-action.git
synced 2025-12-16 23:22:51 +00:00
10 lines
251 B
TypeScript
10 lines
251 B
TypeScript
export async function wait(milliseconds: number): Promise<string> {
|
|
return new Promise(resolve => {
|
|
if (isNaN(milliseconds)) {
|
|
throw new Error('milliseconds not a number')
|
|
}
|
|
|
|
setTimeout(() => resolve('done!'), milliseconds)
|
|
})
|
|
}
|