diff --git a/packages/compiler/src/frontend/lowering/lower-exprs.ts b/packages/compiler/src/frontend/lowering/lower-exprs.ts index d0ab06c4c..f1908cb80 100644 --- a/packages/compiler/src/frontend/lowering/lower-exprs.ts +++ b/packages/compiler/src/frontend/lowering/lower-exprs.ts @@ -923,6 +923,7 @@ function lowerExprInner(L: Lowerer, expr: ts.Expression): IrExpr { WeakRef: "deref()-after-collect exposes GC timing — genuinely dynamic; hold a strong reference instead", FinalizationRegistry: "finalization callbacks expose GC timing — genuinely dynamic; release resources explicitly instead", eval: "runtime code evaluation cannot be compiled ahead of time", + crypto: "the Web Crypto API (globalThis.crypto) has no static lowering; import named exports from 'node:crypto' instead — e.g. `import { randomUUID } from \"node:crypto\"`", }; L.noLowering(expr.text, expr, globalHints[expr.text], sym ?? undefined); } diff --git a/packages/compiler/src/frontend/lowering/lower-stmts.ts b/packages/compiler/src/frontend/lowering/lower-stmts.ts index 354c67c4a..885399873 100644 --- a/packages/compiler/src/frontend/lowering/lower-stmts.ts +++ b/packages/compiler/src/frontend/lowering/lower-stmts.ts @@ -1825,7 +1825,7 @@ export function lowerStmt(L: Lowerer, stmt: ts.Statement): IrStmt | IrStmt[] | n * the one split surface: its five CALL members fence by name, while * the rest (`Console` — the suite's constructor-identity probe) have * no surface to lose and bind tokens. */ - const TOKEN_OPAQUE_GLOBALS: ReadonlySet = new Set(["crypto"]); + const TOKEN_OPAQUE_GLOBALS: ReadonlySet = new Set([]); const CONSOLE_CALL_MEMBERS: ReadonlySet = new Set(["log", "info", "debug", "error", "warn"]); /** `const { subtle } = globalThis.crypto`, `const { Console } = console`,