@tailwindcss/oxide-wasm32-wasi 0.0.0-insiders.d801d8d
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/README.md +3 -0
- package/node_modules/@emnapi/core/LICENSE +21 -0
- package/node_modules/@emnapi/core/README.md +1 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.cjs.js +6661 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.cjs.min.d.ts +363 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.cjs.min.js +1 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.d.mts +363 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.d.ts +365 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.esm-bundler.js +7411 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.js +8390 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.min.d.mts +363 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.min.js +1 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.min.mjs +1 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.mjs +6650 -0
- package/node_modules/@emnapi/core/index.js +5 -0
- package/node_modules/@emnapi/core/package.json +49 -0
- package/node_modules/@emnapi/runtime/LICENSE +21 -0
- package/node_modules/@emnapi/runtime/README.md +1 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.cjs.js +1347 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.cjs.min.d.ts +663 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.cjs.min.js +1 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.d.mts +663 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.d.ts +665 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.esm-bundler.js +1403 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.iife.d.ts +420 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.iife.js +1474 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.js +1475 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.min.d.mts +663 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.min.js +1 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.min.mjs +1 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.mjs +1316 -0
- package/node_modules/@emnapi/runtime/index.js +5 -0
- package/node_modules/@emnapi/runtime/package.json +48 -0
- package/node_modules/@emnapi/wasi-threads/LICENSE +21 -0
- package/node_modules/@emnapi/wasi-threads/README.md +203 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.js +881 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.d.ts +214 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.js +1 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.mts +214 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.ts +216 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.esm-bundler.js +929 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.js +941 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.d.mts +214 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.js +1 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.mjs +1 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.mjs +876 -0
- package/node_modules/@emnapi/wasi-threads/index.js +5 -0
- package/node_modules/@emnapi/wasi-threads/package.json +50 -0
- package/node_modules/@napi-rs/wasm-runtime/LICENSE +43 -0
- package/node_modules/@napi-rs/wasm-runtime/dist/fs.js +23712 -0
- package/node_modules/@napi-rs/wasm-runtime/dist/runtime.js +12269 -0
- package/node_modules/@napi-rs/wasm-runtime/fs-proxy.cjs +193 -0
- package/node_modules/@napi-rs/wasm-runtime/package.json +60 -0
- package/node_modules/@napi-rs/wasm-runtime/runtime.cjs +15 -0
- package/node_modules/@tybys/wasm-util/README.md +193 -0
- package/node_modules/@tybys/wasm-util/dist/tsdoc-metadata.json +11 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.d.ts +417 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.esm-bundler.js +2738 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.esm.js +2738 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.esm.min.js +1 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.js +2760 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.min.js +1 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/asyncify.js +158 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/index.js +13 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/jspi.js +46 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/load.js +97 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/memory.js +35 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/error.js +103 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/fd.js +268 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/fs.js +3 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/index.js +194 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/path.js +174 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/preview1.js +1544 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/rights.js +141 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/types.js +220 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/util.js +128 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/webassembly.js +13 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/asyncify.mjs +153 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/index.mjs +9 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/jspi.mjs +39 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/load.mjs +89 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/memory.mjs +28 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/error.mjs +97 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/fd.mjs +256 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/fs.mjs +1 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/index.mjs +188 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/path.mjs +168 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/preview1.mjs +1539 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/rights.mjs +135 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/types.mjs +216 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/util.mjs +113 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/webassembly.mjs +9 -0
- package/node_modules/@tybys/wasm-util/package.json +58 -0
- package/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/node_modules/tslib/LICENSE.txt +12 -0
- package/node_modules/tslib/README.md +164 -0
- package/node_modules/tslib/SECURITY.md +41 -0
- package/node_modules/tslib/modules/index.d.ts +38 -0
- package/node_modules/tslib/modules/index.js +70 -0
- package/node_modules/tslib/modules/package.json +3 -0
- package/node_modules/tslib/package.json +47 -0
- package/node_modules/tslib/tslib.d.ts +460 -0
- package/node_modules/tslib/tslib.es6.html +1 -0
- package/node_modules/tslib/tslib.es6.js +393 -0
- package/node_modules/tslib/tslib.es6.mjs +392 -0
- package/node_modules/tslib/tslib.html +1 -0
- package/node_modules/tslib/tslib.js +475 -0
- package/package.json +45 -0
- package/tailwindcss-oxide.wasi-browser.js +63 -0
- package/tailwindcss-oxide.wasi.cjs +88 -0
- package/tailwindcss-oxide.wasm32-wasi.wasm +0 -0
- package/wasi-worker-browser.mjs +39 -0
- package/wasi-worker.mjs +63 -0
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
declare namespace emnapi {
|
|
2
|
+
|
|
3
|
+
export type CleanupHookCallbackFunction = number | ((arg: number) => void);
|
|
4
|
+
|
|
5
|
+
export class ConstHandle<S extends undefined | null | boolean | typeof globalThis> extends Handle<S> {
|
|
6
|
+
constructor(id: number, value: S);
|
|
7
|
+
dispose(): void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class Context {
|
|
11
|
+
private _isStopping;
|
|
12
|
+
private _canCallIntoJs;
|
|
13
|
+
private _suppressDestroy;
|
|
14
|
+
envStore: Store<Env>;
|
|
15
|
+
scopeStore: ScopeStore;
|
|
16
|
+
refStore: Store<Reference>;
|
|
17
|
+
deferredStore: Store<Deferred<any>>;
|
|
18
|
+
handleStore: HandleStore;
|
|
19
|
+
private readonly refCounter?;
|
|
20
|
+
private readonly cleanupQueue;
|
|
21
|
+
feature: {
|
|
22
|
+
supportReflect: boolean;
|
|
23
|
+
supportFinalizer: boolean;
|
|
24
|
+
supportWeakSymbol: boolean;
|
|
25
|
+
supportBigInt: boolean;
|
|
26
|
+
supportNewFunction: boolean;
|
|
27
|
+
canSetFunctionName: boolean;
|
|
28
|
+
setImmediate: (callback: () => void) => void;
|
|
29
|
+
Buffer: BufferCtor | undefined;
|
|
30
|
+
MessageChannel: {
|
|
31
|
+
new (): MessageChannel;
|
|
32
|
+
prototype: MessageChannel;
|
|
33
|
+
} | undefined;
|
|
34
|
+
};
|
|
35
|
+
constructor();
|
|
36
|
+
/**
|
|
37
|
+
* Suppress the destroy on `beforeExit` event in Node.js.
|
|
38
|
+
* Call this method if you want to keep the context and
|
|
39
|
+
* all associated {@link Env | Env} alive,
|
|
40
|
+
* this also means that cleanup hooks will not be called.
|
|
41
|
+
* After call this method, you should call
|
|
42
|
+
* {@link Context.destroy | `Context.prototype.destroy`} method manually.
|
|
43
|
+
*/
|
|
44
|
+
suppressDestroy(): void;
|
|
45
|
+
getRuntimeVersions(): {
|
|
46
|
+
version: string;
|
|
47
|
+
NODE_API_SUPPORTED_VERSION_MAX: Version;
|
|
48
|
+
NAPI_VERSION_EXPERIMENTAL: Version;
|
|
49
|
+
NODE_API_DEFAULT_MODULE_API_VERSION: Version;
|
|
50
|
+
};
|
|
51
|
+
createNotSupportWeakRefError(api: string, message: string): NotSupportWeakRefError;
|
|
52
|
+
createNotSupportBufferError(api: string, message: string): NotSupportBufferError;
|
|
53
|
+
createReference(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership): Reference;
|
|
54
|
+
createReferenceWithData(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, data: void_p): Reference;
|
|
55
|
+
createReferenceWithFinalizer(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, finalize_callback?: napi_finalize, finalize_data?: void_p, finalize_hint?: void_p): Reference;
|
|
56
|
+
createDeferred<T = any>(value: IDeferrdValue<T>): Deferred<T>;
|
|
57
|
+
createEnv(filename: string, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never, nodeBinding?: any): Env;
|
|
58
|
+
createTrackedFinalizer(envObject: Env, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): TrackedFinalizer;
|
|
59
|
+
getCurrentScope(): HandleScope | null;
|
|
60
|
+
addToCurrentScope<V>(value: V): Handle<V>;
|
|
61
|
+
openScope(envObject: Env): HandleScope;
|
|
62
|
+
closeScope(envObject: Env, _scope?: HandleScope): void;
|
|
63
|
+
ensureHandle<S>(value: S): Handle<S>;
|
|
64
|
+
addCleanupHook(envObject: Env, fn: CleanupHookCallbackFunction, arg: number): void;
|
|
65
|
+
removeCleanupHook(envObject: Env, fn: CleanupHookCallbackFunction, arg: number): void;
|
|
66
|
+
runCleanup(): void;
|
|
67
|
+
increaseWaitingRequestCounter(): void;
|
|
68
|
+
decreaseWaitingRequestCounter(): void;
|
|
69
|
+
setCanCallIntoJs(value: boolean): void;
|
|
70
|
+
setStopping(value: boolean): void;
|
|
71
|
+
canCallIntoJs(): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Destroy the context and call cleanup hooks.
|
|
74
|
+
* Associated {@link Env | Env} will be destroyed.
|
|
75
|
+
*/
|
|
76
|
+
destroy(): void;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function createContext(): Context;
|
|
80
|
+
|
|
81
|
+
export class Deferred<T = any> implements IStoreValue {
|
|
82
|
+
static create<T = any>(ctx: Context, value: IDeferrdValue<T>): Deferred;
|
|
83
|
+
id: number;
|
|
84
|
+
ctx: Context;
|
|
85
|
+
value: IDeferrdValue<T>;
|
|
86
|
+
constructor(ctx: Context, value: IDeferrdValue<T>);
|
|
87
|
+
resolve(value: T): void;
|
|
88
|
+
reject(reason?: any): void;
|
|
89
|
+
dispose(): void;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export class EmnapiError extends Error {
|
|
93
|
+
constructor(message?: string);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export abstract class Env implements IStoreValue {
|
|
97
|
+
readonly ctx: Context;
|
|
98
|
+
moduleApiVersion: number;
|
|
99
|
+
makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void;
|
|
100
|
+
makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void;
|
|
101
|
+
abort: (msg?: string) => never;
|
|
102
|
+
id: number;
|
|
103
|
+
openHandleScopes: number;
|
|
104
|
+
instanceData: TrackedFinalizer | null;
|
|
105
|
+
tryCatch: TryCatch;
|
|
106
|
+
refs: number;
|
|
107
|
+
reflist: RefTracker;
|
|
108
|
+
finalizing_reflist: RefTracker;
|
|
109
|
+
pendingFinalizers: RefTracker[];
|
|
110
|
+
lastError: {
|
|
111
|
+
errorCode: napi_status;
|
|
112
|
+
engineErrorCode: number;
|
|
113
|
+
engineReserved: Ptr;
|
|
114
|
+
};
|
|
115
|
+
inGcFinalizer: boolean;
|
|
116
|
+
constructor(ctx: Context, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never);
|
|
117
|
+
/** @virtual */
|
|
118
|
+
canCallIntoJs(): boolean;
|
|
119
|
+
terminatedOrTerminating(): boolean;
|
|
120
|
+
ref(): void;
|
|
121
|
+
unref(): void;
|
|
122
|
+
ensureHandle<S>(value: S): Handle<S>;
|
|
123
|
+
ensureHandleId(value: any): napi_value;
|
|
124
|
+
clearLastError(): napi_status;
|
|
125
|
+
setLastError(error_code: napi_status, engine_error_code?: uint32_t, engine_reserved?: void_p): napi_status;
|
|
126
|
+
getReturnStatus(): napi_status;
|
|
127
|
+
callIntoModule<T>(fn: (env: Env) => T, handleException?: (envObject: Env, value: any) => void): T;
|
|
128
|
+
/** @virtual */
|
|
129
|
+
abstract callFinalizer(cb: napi_finalize, data: void_p, hint: void_p): void;
|
|
130
|
+
invokeFinalizerFromGC(finalizer: RefTracker): void;
|
|
131
|
+
checkGCAccess(): void;
|
|
132
|
+
/** @virtual */
|
|
133
|
+
enqueueFinalizer(finalizer: RefTracker): void;
|
|
134
|
+
/** @virtual */
|
|
135
|
+
dequeueFinalizer(finalizer: RefTracker): void;
|
|
136
|
+
/** @virtual */
|
|
137
|
+
deleteMe(): void;
|
|
138
|
+
dispose(): void;
|
|
139
|
+
private readonly _bindingMap;
|
|
140
|
+
initObjectBinding<S extends object>(value: S): IReferenceBinding;
|
|
141
|
+
getObjectBinding<S extends object>(value: S): IReferenceBinding;
|
|
142
|
+
setInstanceData(data: number, finalize_cb: number, finalize_hint: number): void;
|
|
143
|
+
getInstanceData(): number;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** @public */
|
|
147
|
+
interface External_2 extends Record<any, any> {
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** @public */
|
|
151
|
+
const External_2: {
|
|
152
|
+
new (value: number | bigint): External_2;
|
|
153
|
+
prototype: null;
|
|
154
|
+
};
|
|
155
|
+
export { External_2 as External }
|
|
156
|
+
|
|
157
|
+
export class Finalizer {
|
|
158
|
+
envObject: Env;
|
|
159
|
+
private _finalizeCallback;
|
|
160
|
+
private _finalizeData;
|
|
161
|
+
private _finalizeHint;
|
|
162
|
+
private _makeDynCall_vppp;
|
|
163
|
+
constructor(envObject: Env, _finalizeCallback?: napi_finalize, _finalizeData?: void_p, _finalizeHint?: void_p);
|
|
164
|
+
callback(): napi_finalize;
|
|
165
|
+
data(): void_p;
|
|
166
|
+
hint(): void_p;
|
|
167
|
+
resetEnv(): void;
|
|
168
|
+
resetFinalizer(): void;
|
|
169
|
+
callFinalizer(): void;
|
|
170
|
+
dispose(): void;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export function getDefaultContext(): Context;
|
|
174
|
+
|
|
175
|
+
/** @public */
|
|
176
|
+
export function getExternalValue(external: External_2): number | bigint;
|
|
177
|
+
|
|
178
|
+
export class Handle<S> {
|
|
179
|
+
id: number;
|
|
180
|
+
value: S;
|
|
181
|
+
constructor(id: number, value: S);
|
|
182
|
+
data(): void_p;
|
|
183
|
+
isNumber(): boolean;
|
|
184
|
+
isBigInt(): boolean;
|
|
185
|
+
isString(): boolean;
|
|
186
|
+
isFunction(): boolean;
|
|
187
|
+
isExternal(): boolean;
|
|
188
|
+
isObject(): boolean;
|
|
189
|
+
isArray(): boolean;
|
|
190
|
+
isArrayBuffer(): boolean;
|
|
191
|
+
isTypedArray(): boolean;
|
|
192
|
+
isBuffer(BufferConstructor?: BufferCtor): boolean;
|
|
193
|
+
isDataView(): boolean;
|
|
194
|
+
isDate(): boolean;
|
|
195
|
+
isPromise(): boolean;
|
|
196
|
+
isBoolean(): boolean;
|
|
197
|
+
isUndefined(): boolean;
|
|
198
|
+
isSymbol(): boolean;
|
|
199
|
+
isNull(): boolean;
|
|
200
|
+
dispose(): void;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export class HandleScope {
|
|
204
|
+
handleStore: HandleStore;
|
|
205
|
+
id: number;
|
|
206
|
+
parent: HandleScope | null;
|
|
207
|
+
child: HandleScope | null;
|
|
208
|
+
start: number;
|
|
209
|
+
end: number;
|
|
210
|
+
private _escapeCalled;
|
|
211
|
+
callbackInfo: ICallbackInfo;
|
|
212
|
+
constructor(handleStore: HandleStore, id: number, parentScope: HandleScope | null, start: number, end?: number);
|
|
213
|
+
add<V>(value: V): Handle<V>;
|
|
214
|
+
addExternal(data: void_p): Handle<object>;
|
|
215
|
+
dispose(): void;
|
|
216
|
+
escape(handle: number): Handle<any> | null;
|
|
217
|
+
escapeCalled(): boolean;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export class HandleStore {
|
|
221
|
+
static UNDEFINED: ConstHandle<undefined>;
|
|
222
|
+
static NULL: ConstHandle<null>;
|
|
223
|
+
static FALSE: ConstHandle<false>;
|
|
224
|
+
static TRUE: ConstHandle<true>;
|
|
225
|
+
static GLOBAL: ConstHandle<typeof globalThis>;
|
|
226
|
+
static MIN_ID: 6;
|
|
227
|
+
private readonly _values;
|
|
228
|
+
private _next;
|
|
229
|
+
push<S>(value: S): Handle<S>;
|
|
230
|
+
erase(start: number, end: number): void;
|
|
231
|
+
get(id: Ptr): Handle<any> | undefined;
|
|
232
|
+
swap(a: number, b: number): void;
|
|
233
|
+
dispose(): void;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export interface ICallbackInfo {
|
|
237
|
+
thiz: any;
|
|
238
|
+
data: void_p;
|
|
239
|
+
args: ArrayLike<any>;
|
|
240
|
+
fn: Function;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface IDeferrdValue<T = any> {
|
|
244
|
+
resolve: (value: T) => void;
|
|
245
|
+
reject: (reason?: any) => void;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export interface IReferenceBinding {
|
|
249
|
+
wrapped: number;
|
|
250
|
+
tag: Uint32Array | null;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/** @public */
|
|
254
|
+
export function isExternal(object: unknown): object is External_2;
|
|
255
|
+
|
|
256
|
+
export function isReferenceType(v: any): v is object;
|
|
257
|
+
|
|
258
|
+
export interface IStoreValue {
|
|
259
|
+
id: number;
|
|
260
|
+
dispose(): void;
|
|
261
|
+
[x: string]: any;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export const NAPI_VERSION_EXPERIMENTAL = Version.NAPI_VERSION_EXPERIMENTAL;
|
|
265
|
+
|
|
266
|
+
export const NODE_API_DEFAULT_MODULE_API_VERSION = Version.NODE_API_DEFAULT_MODULE_API_VERSION;
|
|
267
|
+
|
|
268
|
+
export const NODE_API_SUPPORTED_VERSION_MAX = Version.NODE_API_SUPPORTED_VERSION_MAX;
|
|
269
|
+
|
|
270
|
+
export const NODE_API_SUPPORTED_VERSION_MIN = Version.NODE_API_SUPPORTED_VERSION_MIN;
|
|
271
|
+
|
|
272
|
+
export class NodeEnv extends Env {
|
|
273
|
+
filename: string;
|
|
274
|
+
private readonly nodeBinding?;
|
|
275
|
+
destructing: boolean;
|
|
276
|
+
finalizationScheduled: boolean;
|
|
277
|
+
constructor(ctx: Context, filename: string, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never, nodeBinding?: any);
|
|
278
|
+
deleteMe(): void;
|
|
279
|
+
canCallIntoJs(): boolean;
|
|
280
|
+
triggerFatalException(err: any): void;
|
|
281
|
+
callbackIntoModule<T>(enforceUncaughtExceptionPolicy: boolean, fn: (env: Env) => T): T;
|
|
282
|
+
callFinalizer(cb: napi_finalize, data: void_p, hint: void_p): void;
|
|
283
|
+
callFinalizerInternal(forceUncaught: int, cb: napi_finalize, data: void_p, hint: void_p): void;
|
|
284
|
+
enqueueFinalizer(finalizer: RefTracker): void;
|
|
285
|
+
drainFinalizerQueue(): void;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export class NotSupportBufferError extends EmnapiError {
|
|
289
|
+
constructor(api: string, message: string);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export class NotSupportWeakRefError extends EmnapiError {
|
|
293
|
+
constructor(api: string, message: string);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export class Persistent<T> {
|
|
297
|
+
private _ref;
|
|
298
|
+
private _param;
|
|
299
|
+
private _callback;
|
|
300
|
+
private static readonly _registry;
|
|
301
|
+
constructor(value: T);
|
|
302
|
+
setWeak<P>(param: P, callback: (param: P) => void): void;
|
|
303
|
+
clearWeak(): void;
|
|
304
|
+
reset(): void;
|
|
305
|
+
isEmpty(): boolean;
|
|
306
|
+
deref(): T | undefined;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export class Reference extends RefTracker implements IStoreValue {
|
|
310
|
+
private static weakCallback;
|
|
311
|
+
id: number;
|
|
312
|
+
envObject: Env;
|
|
313
|
+
private readonly canBeWeak;
|
|
314
|
+
private _refcount;
|
|
315
|
+
private readonly _ownership;
|
|
316
|
+
persistent: Persistent<object>;
|
|
317
|
+
static create(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, _unused1?: void_p, _unused2?: void_p, _unused3?: void_p): Reference;
|
|
318
|
+
protected constructor(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership);
|
|
319
|
+
ref(): number;
|
|
320
|
+
unref(): number;
|
|
321
|
+
get(envObject?: Env): napi_value;
|
|
322
|
+
/** @virtual */
|
|
323
|
+
resetFinalizer(): void;
|
|
324
|
+
/** @virtual */
|
|
325
|
+
data(): void_p;
|
|
326
|
+
refcount(): number;
|
|
327
|
+
ownership(): ReferenceOwnership;
|
|
328
|
+
/** @virtual */
|
|
329
|
+
protected callUserFinalizer(): void;
|
|
330
|
+
/** @virtual */
|
|
331
|
+
protected invokeFinalizerFromGC(): void;
|
|
332
|
+
private _setWeak;
|
|
333
|
+
finalize(): void;
|
|
334
|
+
dispose(): void;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export enum ReferenceOwnership {
|
|
338
|
+
kRuntime = 0,
|
|
339
|
+
kUserland = 1
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export class ReferenceWithData extends Reference {
|
|
343
|
+
private readonly _data;
|
|
344
|
+
static create(envObject: Env, value: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, data: void_p): ReferenceWithData;
|
|
345
|
+
private constructor();
|
|
346
|
+
data(): void_p;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export class ReferenceWithFinalizer extends Reference {
|
|
350
|
+
private _finalizer;
|
|
351
|
+
static create(envObject: Env, value: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): ReferenceWithFinalizer;
|
|
352
|
+
private constructor();
|
|
353
|
+
resetFinalizer(): void;
|
|
354
|
+
data(): void_p;
|
|
355
|
+
protected callUserFinalizer(): void;
|
|
356
|
+
protected invokeFinalizerFromGC(): void;
|
|
357
|
+
dispose(): void;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export class RefTracker {
|
|
361
|
+
/** @virtual */
|
|
362
|
+
dispose(): void;
|
|
363
|
+
/** @virtual */
|
|
364
|
+
finalize(): void;
|
|
365
|
+
private _next;
|
|
366
|
+
private _prev;
|
|
367
|
+
link(list: RefTracker): void;
|
|
368
|
+
unlink(): void;
|
|
369
|
+
static finalizeAll(list: RefTracker): void;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export class ScopeStore {
|
|
373
|
+
private readonly _rootScope;
|
|
374
|
+
currentScope: HandleScope;
|
|
375
|
+
private readonly _values;
|
|
376
|
+
constructor();
|
|
377
|
+
get(id: number): HandleScope | undefined;
|
|
378
|
+
openScope(envObject: Env): HandleScope;
|
|
379
|
+
closeScope(envObject: Env): void;
|
|
380
|
+
dispose(): void;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
export class Store<V extends IStoreValue> {
|
|
384
|
+
protected _values: Array<V | undefined>;
|
|
385
|
+
private _freeList;
|
|
386
|
+
private _size;
|
|
387
|
+
constructor();
|
|
388
|
+
add(value: V): void;
|
|
389
|
+
get(id: Ptr): V | undefined;
|
|
390
|
+
has(id: Ptr): boolean;
|
|
391
|
+
remove(id: Ptr): void;
|
|
392
|
+
dispose(): void;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export class TrackedFinalizer extends RefTracker {
|
|
396
|
+
private _finalizer;
|
|
397
|
+
static create(envObject: Env, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): TrackedFinalizer;
|
|
398
|
+
private constructor();
|
|
399
|
+
data(): void_p;
|
|
400
|
+
dispose(): void;
|
|
401
|
+
finalize(): void;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
export class TryCatch {
|
|
405
|
+
private _exception;
|
|
406
|
+
private _caught;
|
|
407
|
+
isEmpty(): boolean;
|
|
408
|
+
hasCaught(): boolean;
|
|
409
|
+
exception(): any;
|
|
410
|
+
setError(err: any): void;
|
|
411
|
+
reset(): void;
|
|
412
|
+
extractException(): any;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export const version: string;
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
}
|