Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/tsc/dts/lib.deno.shared_globals.d.ts>clearTimeout

A modern runtime for JavaScript and TypeScript.
Latest
function clearTimeout
import { clearTimeout } from "https://deno.land/x/deno@v2.0.4/cli/tsc/dts/lib.deno.shared_globals.d.ts";

Cancels a scheduled action initiated by setTimeout()

const id = setTimeout(() => {console.log('hello');}, 500);
// ...
clearTimeout(id);

Parameters

optional
id: number