/
usr
/
local
/
lib
/
node_modules
/
pm2
/
node_modules
/
@tootallnate
/
quickjs-emscripten
/
dist
/
/usr/local/lib/node_modules/pm2/node_modules/@tootallnate/quickjs-emscripten/dist
mkdir
upload
Name
Size
Mode
Actions
generated/
-
0755
rm
asyncify-helpers.d.ts
1475
0644
edit
dl
rm
asyncify-helpers.js
1818
0644
edit
dl
rm
asyncify-helpers.js.map
4205
0644
edit
dl
rm
context-asyncify.d.ts
2177
0644
edit
dl
rm
context-asyncify.js
2370
0644
edit
dl
rm
context-asyncify.js.map
4651
0644
edit
dl
rm
context.d.ts
16065
0644
edit
dl
rm
context.js
29595
0644
edit
dl
rm
context.js.map
53303
0644
edit
dl
rm
debug.d.ts
156
0644
edit
dl
rm
debug.js
327
0644
edit
dl
rm
debug.js.map
518
0644
edit
dl
rm
deferred-promise.d.ts
2957
0644
edit
dl
rm
deferred-promise.js
3754
0644
edit
dl
rm
deferred-promise.js.map
6176
0644
edit
dl
rm
emscripten-types.d.ts
3886
0644
edit
dl
rm
emscripten-types.js
776
0644
edit
dl
rm
emscripten-types.js.map
5484
0644
edit
dl
rm
errors.d.ts
836
0644
edit
dl
rm
errors.js
1914
0644
edit
dl
rm
errors.js.map
1780
0644
edit
dl
rm
esmHelpers.d.ts
420
0644
edit
dl
rm
esmHelpers.js
778
0644
edit
dl
rm
esmHelpers.js.map
1126
0644
edit
dl
rm
index.d.ts
4076
0644
edit
dl
rm
index.js
5949
0644
edit
dl
rm
index.js.map
6569
0644
edit
dl
rm
lifetime.d.ts
4399
0644
edit
dl
rm
lifetime.js
6724
0644
edit
dl
rm
lifetime.js.map
11858
0644
edit
dl
rm
memory.d.ts
775
0644
edit
dl
rm
memory.js
1707
0644
edit
dl
rm
memory.js.map
3896
0644
edit
dl
rm
module-asyncify.d.ts
2386
0644
edit
dl
rm
module-asyncify.js
4035
0644
edit
dl
rm
module-asyncify.js.map
6459
0644
edit
dl
rm
module-test.d.ts
1118
0644
edit
dl
rm
module-test.js
2669
0644
edit
dl
rm
module-test.js.map
4672
0644
edit
dl
rm
module.d.ts
6272
0644
edit
dl
rm
module.js
12740
0644
edit
dl
rm
module.js.map
21716
0644
edit
dl
rm
runtime-asyncify.d.ts
1687
0644
edit
dl
rm
runtime-asyncify.js
1880
0644
edit
dl
rm
runtime-asyncify.js.map
4082
0644
edit
dl
rm
runtime.d.ts
7048
0644
edit
dl
rm
runtime.js
12909
0644
edit
dl
rm
runtime.js.map
22367
0644
edit
dl
rm
types-ffi.d.ts
3439
0644
edit
dl
rm
types-ffi.js
1346
0644
edit
dl
rm
types-ffi.js.map
4712
0644
edit
dl
rm
types.d.ts
6751
0644
edit
dl
rm
types.js
1722
0644
edit
dl
rm
types.js.map
9272
0644
edit
dl
rm
variants.d.ts
4784
0644
edit
dl
rm
variants.js
6893
0644
edit
dl
rm
variants.js.map
10226
0644
edit
dl
rm
vm-interface.d.ts
2669
0644
edit
dl
rm
vm-interface.js
384
0644
edit
dl
rm
vm-interface.js.map
3179
0644
edit
dl
rm
Edit:
/usr/local/lib/node_modules/pm2/node_modules/@tootallnate/quickjs-emscripten/dist/lifetime.d.ts
(4399B)
import { MaybeAsyncBlock } from "./asyncify-helpers"; import type { QuickJSHandle } from "./types"; /** * An object that can be disposed. * [[Lifetime]] is the canonical implementation of Disposable. * Use [[Scope]] to manage cleaning up multiple disposables. */ export interface Disposable { /** * Dispose of the underlying resources used by this object. */ dispose(): void; /** * @returns true if the object is alive * @returns false after the object has been [[dispose]]d */ alive: boolean; } /** * A lifetime prevents access to a value after the lifetime has been * [[dispose]]ed. * * Typically, quickjs-emscripten uses Lifetimes to protect C memory pointers. */ export declare class Lifetime<T, TCopy = never, Owner = never> implements Disposable { protected readonly _value: T; protected readonly copier?: ((value: T | TCopy) => TCopy) | undefined; protected readonly disposer?: ((value: T | TCopy) => void) | undefined; protected readonly _owner?: Owner | undefined; protected _alive: boolean; protected _constructorStack: string | undefined; /** * When the Lifetime is disposed, it will call `disposer(_value)`. Use the * disposer function to implement whatever cleanup needs to happen at the end * of `value`'s lifetime. * * `_owner` is not used or controlled by the lifetime. It's just metadata for * the creator. */ constructor(_value: T, copier?: ((value: T | TCopy) => TCopy) | undefined, disposer?: ((value: T | TCopy) => void) | undefined, _owner?: Owner | undefined); get alive(): boolean; /** * The value this Lifetime protects. You must never retain the value - it * may become invalid, leading to memory errors. * * @throws If the lifetime has been [[dispose]]d already. */ get value(): T; get owner(): Owner | undefined; get dupable(): boolean; /** * Create a new handle pointing to the same [[value]]. */ dup(): Lifetime<TCopy, TCopy, Owner>; /** * Call `map` with this lifetime, then dispose the lifetime. * @return the result of `map(this)`. */ consume<O>(map: (lifetime: this) => O): O; consume<O>(map: (lifetime: QuickJSHandle) => O): O; /** * Dispose of [[value]] and perform cleanup. */ dispose(): void; private assertAlive; } /** * A Lifetime that lives forever. Used for constants. */ export declare class StaticLifetime<T, Owner = never> extends Lifetime<T, T, Owner> { constructor(value: T, owner?: Owner); get dupable(): boolean; dup(): this; dispose(): void; } /** * A Lifetime that does not own its `value`. A WeakLifetime never calls its * `disposer` function, but can be `dup`ed to produce regular lifetimes that * do. * * Used for function arguments. */ export declare class WeakLifetime<T, TCopy = never, Owner = never> extends Lifetime<T, TCopy, Owner> { constructor(value: T, copier?: (value: T | TCopy) => TCopy, disposer?: (value: TCopy) => void, owner?: Owner); dispose(): void; } /** * Scope helps reduce the burden of manually tracking and disposing of * Lifetimes. See [[withScope]]. and [[withScopeAsync]]. */ export declare class Scope implements Disposable { /** * Run `block` with a new Scope instance that will be disposed after the block returns. * Inside `block`, call `scope.manage` on each lifetime you create to have the lifetime * automatically disposed after the block returns. * * @warning Do not use with async functions. Instead, use [[withScopeAsync]]. */ static withScope<R>(block: (scope: Scope) => R): R; static withScopeMaybeAsync<Return, This, Yielded>(_this: This, block: MaybeAsyncBlock<Return, This, Yielded, [Scope]>): Return | Promise<Return>; /** * Run `block` with a new Scope instance that will be disposed after the * block's returned promise settles. Inside `block`, call `scope.manage` on each * lifetime you create to have the lifetime automatically disposed after the * block returns. */ static withScopeAsync<R>(block: (scope: Scope) => Promise<R>): Promise<R>; private _disposables; /** * Track `lifetime` so that it is disposed when this scope is disposed. */ manage<T extends Disposable>(lifetime: T): T; get alive(): boolean; dispose(): void; }
Save
cmd:
run