Skip to content

Commit 520d3bd

Browse files
committed
feat(typing): expose atob/btoa as properties of the global object
1 parent 4968edd commit 520d3bd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/pythonmonkey/global.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ declare function pmEval(code: string): any;
4343
// Expose our own `console` as a property of the global object
4444
declare const console: import("console").Console;
4545

46+
// 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;
49+
4650
// Keep this in sync with both https://hg.mozilla.org/releases/mozilla-esr102/file/a03fde6/js/public/Promise.h#l331
4751
// and https://github.com/nodejs/node/blob/v20.2.0/deps/v8/include/v8-promise.h#L30
4852
declare enum PromiseState { Pending = 0, Fulfilled = 1, Rejected = 2 }

0 commit comments

Comments
 (0)