quickjs-emscripten-sync 1.5.0 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { QuickJSContext } from 'quickjs-emscripten';
1
+ import { QuickJSContext } from 'quickjs-emscripten';
2
2
  import type { QuickJSDeferredPromise } from 'quickjs-emscripten';
3
3
  import type { QuickJSHandle } from 'quickjs-emscripten';
4
4
  import type { SuccessOrFail } from 'quickjs-emscripten';
@@ -8,7 +8,7 @@ import type { VmCallResult } from 'quickjs-emscripten';
8
8
  * The Arena class manages all generated handles at once by quickjs-emscripten and automatically converts objects between the host and the QuickJS VM.
9
9
  */
10
10
  export declare class Arena {
11
- context: QuickJSContext;
11
+ context: QuickJSContextEx;
12
12
  _map: VMMap;
13
13
  _registeredMap: VMMap;
14
14
  _registeredMapDispose: Set<any>;
@@ -129,6 +129,8 @@ export declare type Options = {
129
129
  isHandleWrappable?: (handle: QuickJSHandle, ctx: QuickJSContext) => boolean;
130
130
  /** Compatibility with quickjs-emscripten prior to v0.15. Inject code for compatibility into context at Arena class initialization time. */
131
131
  compat?: boolean;
132
+ /** Experimental: use QuickJSContextEx, which wraps existing QuickJSContext. */
133
+ experimentalContextEx?: boolean;
132
134
  };
133
135
 
134
136
  declare type Options_2 = {
@@ -150,6 +152,10 @@ declare type Options_3 = {
150
152
  custom?: Iterable<(obj: QuickJSHandle, ctx: QuickJSContext) => any>;
151
153
  };
152
154
 
155
+ declare type QuickJSContextEx = QuickJSContext & {
156
+ disposeEx?: () => void;
157
+ };
158
+
153
159
  export declare function unmarshal(handle: QuickJSHandle, options: Options_3): any;
154
160
 
155
161
  export declare class VMMap {