Files
scriptc/tests/corpus/performance-presence.ts
Chris Tate c257368c5e Compile Effect generators statically (#589)
* Compile Effect generators statically

* test: declare the dormant array write's expected fence
2026-09-30 14:25:29 -05:00

15 lines
551 B
TypeScript

import { performance as imported } from "node:perf_hooks";
console.log(typeof performance, typeof performance.now);
console.log(typeof globalThis.performance, typeof globalThis.performance.now);
console.log(typeof imported, typeof imported.now);
if (typeof performance !== "undefined" && typeof performance.now === "function") {
const first = performance.now();
const last = performance.now();
console.log(first >= 0, last >= first);
}
function shadowed() {
const performance = { now: 5 };
console.log(typeof performance.now);
}
shadowed();