method legacyCompat.sleep
legacyCompat.sleep(seconds: number): Promise<void>

Perl's sleep($seconds) blocks synchronously; JS has no synchronous sleep, so this is a setTimeout-backed Promise instead — every call site must await it (the converter's own sleep mapping in render.rs always emits the await, forcing the enclosing function async the same way an awaited ->get()/->post() Mojo call already does).

Parameters

seconds: number

Return Type

Promise<void>

Usage

import { legacyCompat } from "plugins/legacy-globals.d.ts";