mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-23 06:10:02 +08:00
* Compile Effect generators statically * test: declare the dormant array write's expected fence
15 lines
551 B
TypeScript
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();
|