We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2e9a52 commit 7dad671Copy full SHA for 7dad671
2 files changed
bun-preload.ts
@@ -1,3 +1 @@
1
import "@sigma/deno-compat";
2
-//@ts-ignore polyfill
3
-Symbol.metadata ??= Symbol("Symbol.metadata");
src/index.ts
@@ -14,10 +14,10 @@ import { tokenize } from "./tokenizer.ts";
14
import { parseTokens } from "./parser.ts";
15
import process from "node:process";
16
17
-if (typeof Symbol === "undefined" || !Symbol.metadata) {
18
- throw new Error(
19
- "Symbol.metadata is not defined. This might mean the decorator implementation is incomplete or a polyfill is missing.",
20
- );
+// @ts-ignore polyfill
+if (typeof Symbol !== "undefined" && !Symbol.metadata) {
+ // @ts-ignore polyfill
+ Symbol.metadata = Symbol("Symbol.metadata");
21
}
22
23
/**
0 commit comments