Skip to content

Commit 360f4d1

Browse files
committed
fix(typing): we must use "var" to declare global properties
1 parent 6e75e9e commit 360f4d1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/pythonmonkey/global.d.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ declare const python: {
4141
declare function pmEval(code: string): any;
4242

4343
// Expose our own `console` as a property of the global object
44-
declare const console: import("console").Console;
44+
// XXX: ↓↓↓ we must use "var" here
45+
declare var console: import("console").Console;
4546

4647
// Expose `atob`/`btoa` as properties of the global object
47-
declare const atob: typeof import("base64.js").atob;
48-
declare const btoa: typeof import("base64.js").btoa;
48+
declare var atob: typeof import("base64").atob;
49+
declare var btoa: typeof import("base64").btoa;
4950

5051
// Keep this in sync with both https://hg.mozilla.org/releases/mozilla-esr102/file/a03fde6/js/public/Promise.h#l331
5152
// and https://github.com/nodejs/node/blob/v20.2.0/deps/v8/include/v8-promise.h#L30

0 commit comments

Comments
 (0)