// Auto-generated by scripts/gen_parity_tests.py from docs/runtime-parity.md.
// Module: node:timers
// This file is a byte-for-byte parity test against `node --experimental-strip-types`.
// Edit the TODO lines below to exercise each API; rerun
// `./run_parity_tests.sh --filter test_parity_timers` to verify.

import * as timers from "node:timers";


// ── Functions ──
try {
  console.log("setTimeout typeof:", typeof timers.setTimeout);
  console.log("setInterval typeof:", typeof timers.setInterval);
  console.log("setImmediate typeof:", typeof timers.setImmediate);
  console.log("clearTimeout typeof:", typeof timers.clearTimeout);
  console.log("clearInterval typeof:", typeof timers.clearInterval);
  console.log("clearImmediate typeof:", typeof timers.clearImmediate);
} catch (e) {
  console.log("functions error:", (e as Error).message);
}

// ── setTimeout / clearTimeout ──
try {
  const t = timers.setTimeout(() => {}, 0);
  console.log("setTimeout returned:", typeof t);
  timers.clearTimeout(t);
  console.log("clearTimeout ok");
} catch (e) {
  console.log("setTimeout/clearTimeout error:", (e as Error).message);
}

// ── setInterval / clearInterval ──
try {
  const i = timers.setInterval(() => {}, 0);
  console.log("setInterval returned:", typeof i);
  timers.clearInterval(i);
  console.log("clearInterval ok");
} catch (e) {
  console.log("setInterval/clearInterval error:", (e as Error).message);
}

// ── setImmediate / clearImmediate ──
try {
  const im = timers.setImmediate(() => {});
  console.log("setImmediate returned:", typeof im);
  timers.clearImmediate(im);
  console.log("clearImmediate ok");
} catch (e) {
  console.log("setImmediate/clearImmediate error:", (e as Error).message);
}

// ── Class: Timeout ──
try {
  const t = timers.setTimeout(() => {}, 0);
  console.log("timeout.ref typeof:", typeof t.ref);
  console.log("timeout.unref typeof:", typeof t.unref);
  console.log("timeout.hasRef typeof:", typeof t.hasRef);
  console.log("timeout.refresh typeof:", typeof t.refresh);
  console.log("timeout.close typeof:", typeof t.close);
  timers.clearTimeout(t);
} catch (e) {
  console.log("Timeout class error:", (e as Error).message);
}

// ── Class: Immediate ──
try {
  const im = timers.setImmediate(() => {});
  console.log("immediate.ref typeof:", typeof im.ref);
  console.log("immediate.unref typeof:", typeof im.unref);
  console.log("immediate.hasRef typeof:", typeof im.hasRef);
  timers.clearImmediate(im);
} catch (e) {
  console.log("Immediate class error:", (e as Error).message);
}

// Coverage: 0 auto-emitted, 17 TODO, 0 skip-listed.
