@jitl/quickjs-ffi-types
Advanced tools
Comparing version 0.29.2 to 0.30.0
@@ -46,2 +46,6 @@ /** | ||
*/ | ||
type JSValuePointerPointerPointer = Pointer<"*JSValue[]">; | ||
/** | ||
* Used internally for Javascript-to-C function calls. | ||
*/ | ||
type JSValueConstPointerPointer = Pointer<"JSValueConst[]">; | ||
@@ -82,2 +86,3 @@ /** | ||
type JSVoidPointer = Pointer<any>; | ||
type UInt32Pointer = Pointer<"uint32_t">; | ||
/** | ||
@@ -120,3 +125,3 @@ * @private | ||
type IntrinsicsFlags = Brand<number, "IntrinsicsFlags">; | ||
/** Bitfield options for QTS_NewContext intrinsices */ | ||
/** Bitfield options for QTS_NewContext intrinsics */ | ||
declare const IntrinsicsFlags: { | ||
@@ -149,2 +154,25 @@ readonly BaseObjects: number; | ||
}; | ||
/** | ||
* @private | ||
*/ | ||
type GetOwnPropertyNamesFlags = Brand<number, "GetOwnPropertyNamesFlags">; | ||
/** Bitfield options for QTS_GetOwnPropertyNames */ | ||
declare const GetOwnPropertyNamesFlags: { | ||
JS_GPN_STRING_MASK: number; | ||
JS_GPN_SYMBOL_MASK: number; | ||
JS_GPN_PRIVATE_MASK: number; | ||
JS_GPN_ENUM_ONLY: number; | ||
JS_GPN_SET_ENUM: number; | ||
QTS_GPN_NUMBER_MASK: number; | ||
QTS_STANDARD_COMPLIANT_NUMBER: number; | ||
}; | ||
/** | ||
* @private | ||
*/ | ||
type IsEqualOp = Brand<number, "IsEqualOp">; | ||
declare const IsEqualOp: { | ||
IsStrictlyEqual: IsEqualOp; | ||
IsSameValue: IsEqualOp; | ||
IsSameValueZero: IsEqualOp; | ||
}; | ||
@@ -360,4 +388,6 @@ declare namespace Emscripten { | ||
QTS_GetProp: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: JSValuePointer | JSValueConstPointer) => JSValuePointer; | ||
QTS_GetPropNumber: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: number) => JSValuePointer; | ||
QTS_SetProp: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: JSValuePointer | JSValueConstPointer, prop_value: JSValuePointer | JSValueConstPointer) => void; | ||
QTS_DefineProp: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: JSValuePointer | JSValueConstPointer, prop_value: JSValuePointer | JSValueConstPointer, get: JSValuePointer | JSValueConstPointer, set: JSValuePointer | JSValueConstPointer, configurable: boolean, enumerable: boolean, has_value: boolean) => void; | ||
QTS_GetOwnPropertyNames: (ctx: JSContextPointer, out_ptrs: JSValuePointerPointerPointer, out_len: UInt32Pointer, obj: JSValuePointer | JSValueConstPointer, flags: number) => JSValuePointer; | ||
QTS_Call: (ctx: JSContextPointer, func_obj: JSValuePointer | JSValueConstPointer, this_obj: JSValuePointer | JSValueConstPointer, argc: number, argv_ptrs: JSValueConstPointerPointer) => JSValuePointer; | ||
@@ -369,2 +399,4 @@ QTS_ResolveException: (ctx: JSContextPointer, maybe_exception: JSValuePointer) => JSValuePointer; | ||
QTS_Typeof: (ctx: JSContextPointer, value: JSValuePointer | JSValueConstPointer) => OwnedHeapCharPointer; | ||
QTS_GetLength: (ctx: JSContextPointer, out_len: UInt32Pointer, value: JSValuePointer | JSValueConstPointer) => number; | ||
QTS_IsEqual: (ctx: JSContextPointer, a: JSValuePointer | JSValueConstPointer, b: JSValuePointer | JSValueConstPointer, op: IsEqualOp) => number; | ||
QTS_GetGlobalObject: (ctx: JSContextPointer) => JSValuePointer; | ||
@@ -375,2 +407,4 @@ QTS_NewPromiseCapability: (ctx: JSContextPointer, resolve_funcs_out: JSValuePointerPointer) => JSValuePointer; | ||
QTS_TestStringArg: (string: string) => void; | ||
QTS_GetDebugLogEnabled: (rt: JSRuntimePointer) => number; | ||
QTS_SetDebugLogEnabled: (rt: JSRuntimePointer, is_enabled: number) => void; | ||
QTS_BuildIsDebug: () => number; | ||
@@ -438,5 +472,9 @@ QTS_BuildIsAsyncify: () => number; | ||
QTS_GetProp_MaybeAsync: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: JSValuePointer | JSValueConstPointer) => JSValuePointer | Promise<JSValuePointer>; | ||
QTS_GetPropNumber: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: number) => JSValuePointer; | ||
QTS_GetPropNumber_MaybeAsync: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: number) => JSValuePointer | Promise<JSValuePointer>; | ||
QTS_SetProp: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: JSValuePointer | JSValueConstPointer, prop_value: JSValuePointer | JSValueConstPointer) => void; | ||
QTS_SetProp_MaybeAsync: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: JSValuePointer | JSValueConstPointer, prop_value: JSValuePointer | JSValueConstPointer) => void | Promise<void>; | ||
QTS_DefineProp: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: JSValuePointer | JSValueConstPointer, prop_value: JSValuePointer | JSValueConstPointer, get: JSValuePointer | JSValueConstPointer, set: JSValuePointer | JSValueConstPointer, configurable: boolean, enumerable: boolean, has_value: boolean) => void; | ||
QTS_GetOwnPropertyNames: (ctx: JSContextPointer, out_ptrs: JSValuePointerPointerPointer, out_len: UInt32Pointer, obj: JSValuePointer | JSValueConstPointer, flags: number) => JSValuePointer; | ||
QTS_GetOwnPropertyNames_MaybeAsync: (ctx: JSContextPointer, out_ptrs: JSValuePointerPointerPointer, out_len: UInt32Pointer, obj: JSValuePointer | JSValueConstPointer, flags: number) => JSValuePointer | Promise<JSValuePointer>; | ||
QTS_Call: (ctx: JSContextPointer, func_obj: JSValuePointer | JSValueConstPointer, this_obj: JSValuePointer | JSValueConstPointer, argc: number, argv_ptrs: JSValueConstPointerPointer) => JSValuePointer; | ||
@@ -451,2 +489,4 @@ QTS_Call_MaybeAsync: (ctx: JSContextPointer, func_obj: JSValuePointer | JSValueConstPointer, this_obj: JSValuePointer | JSValueConstPointer, argc: number, argv_ptrs: JSValueConstPointerPointer) => JSValuePointer | Promise<JSValuePointer>; | ||
QTS_Typeof: (ctx: JSContextPointer, value: JSValuePointer | JSValueConstPointer) => OwnedHeapCharPointer; | ||
QTS_GetLength: (ctx: JSContextPointer, out_len: UInt32Pointer, value: JSValuePointer | JSValueConstPointer) => number; | ||
QTS_IsEqual: (ctx: JSContextPointer, a: JSValuePointer | JSValueConstPointer, b: JSValuePointer | JSValueConstPointer, op: IsEqualOp) => number; | ||
QTS_GetGlobalObject: (ctx: JSContextPointer) => JSValuePointer; | ||
@@ -457,2 +497,4 @@ QTS_NewPromiseCapability: (ctx: JSContextPointer, resolve_funcs_out: JSValuePointerPointer) => JSValuePointer; | ||
QTS_TestStringArg: (string: string) => void; | ||
QTS_GetDebugLogEnabled: (rt: JSRuntimePointer) => number; | ||
QTS_SetDebugLogEnabled: (rt: JSRuntimePointer, is_enabled: number) => void; | ||
QTS_BuildIsDebug: () => number; | ||
@@ -508,2 +550,2 @@ QTS_BuildIsAsyncify: () => number; | ||
export { type Asyncify, type AsyncifySleepResult, type BorrowedHeapCharPointer, type EitherFFI, type EitherModule, type EmscriptenModule, type EmscriptenModuleCallbacks, type EmscriptenModuleLoader, type EmscriptenModuleLoaderOptions, type EvalDetectModule, EvalFlags, IntrinsicsFlags, type JSBorrowedCharPointer, type JSContextPointer, type JSContextPointerPointer, type JSModuleDefPointer, JSPromiseStateEnum, type JSRuntimePointer, type JSValueConstPointer, type JSValueConstPointerPointer, type JSValuePointer, type JSValuePointerPointer, type JSVoidPointer, type OwnedHeapCharPointer, type QTS_C_To_HostCallbackFuncPointer, type QTS_C_To_HostInterruptFuncPointer, type QTS_C_To_HostLoadModuleFuncPointer, type QuickJSAsyncEmscriptenModule, type QuickJSAsyncFFI, type QuickJSAsyncVariant, type QuickJSEmscriptenExtensions, type QuickJSEmscriptenModule, type QuickJSFFI, type QuickJSSyncVariant, type QuickJSVariant, type SourceMapData, assertSync }; | ||
export { type Asyncify, type AsyncifySleepResult, type BorrowedHeapCharPointer, type EitherFFI, type EitherModule, type EmscriptenModule, type EmscriptenModuleCallbacks, type EmscriptenModuleLoader, type EmscriptenModuleLoaderOptions, type EvalDetectModule, EvalFlags, GetOwnPropertyNamesFlags, IntrinsicsFlags, IsEqualOp, type JSBorrowedCharPointer, type JSContextPointer, type JSContextPointerPointer, type JSModuleDefPointer, JSPromiseStateEnum, type JSRuntimePointer, type JSValueConstPointer, type JSValueConstPointerPointer, type JSValuePointer, type JSValuePointerPointer, type JSValuePointerPointerPointer, type JSVoidPointer, type OwnedHeapCharPointer, type QTS_C_To_HostCallbackFuncPointer, type QTS_C_To_HostInterruptFuncPointer, type QTS_C_To_HostLoadModuleFuncPointer, type QuickJSAsyncEmscriptenModule, type QuickJSAsyncFFI, type QuickJSAsyncVariant, type QuickJSEmscriptenExtensions, type QuickJSEmscriptenModule, type QuickJSFFI, type QuickJSSyncVariant, type QuickJSVariant, type SourceMapData, type UInt32Pointer, assertSync }; |
@@ -1,2 +0,2 @@ | ||
"use strict";var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var P=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},S=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of p(e))!s.call(t,n)&&n!==r&&i(t,n,{get:()=>e[n],enumerable:!(o=a(e,n))||o.enumerable});return t};var u=t=>S(i({},"__esModule",{value:!0}),t);var y={};P(y,{EvalFlags:()=>c,IntrinsicsFlags:()=>l,JSPromiseStateEnum:()=>x,assertSync:()=>_});module.exports=u(y);function _(t){return function(...r){let o=t(...r);if(o&&typeof o=="object"&&o instanceof Promise)throw new Error("Function unexpectedly returned a Promise");return o}}var c={JS_EVAL_TYPE_GLOBAL:0,JS_EVAL_TYPE_MODULE:1,JS_EVAL_TYPE_DIRECT:2,JS_EVAL_TYPE_INDIRECT:3,JS_EVAL_TYPE_MASK:3,JS_EVAL_FLAG_STRICT:8,JS_EVAL_FLAG_STRIP:16,JS_EVAL_FLAG_COMPILE_ONLY:32,JS_EVAL_FLAG_BACKTRACE_BARRIER:64},l={BaseObjects:1,Date:2,Eval:4,StringNormalize:8,RegExp:16,RegExpCompiler:32,JSON:64,Proxy:128,MapSet:256,TypedArrays:512,Promise:1024,BigInt:2048,BigFloat:4096,BigDecimal:8192,OperatorOverloading:16384,BignumExt:32768},x={Pending:0,Fulfilled:1,Rejected:2};0&&(module.exports={EvalFlags,IntrinsicsFlags,JSPromiseStateEnum,assertSync}); | ||
"use strict";var a=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var P=(t,e)=>{for(var o in e)a(t,o,{get:e[o],enumerable:!0})},S=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of s(e))!i.call(t,n)&&n!==o&&a(t,n,{get:()=>e[n],enumerable:!(r=p(e,n))||r.enumerable});return t};var _=t=>S(a({},"__esModule",{value:!0}),t);var J={};P(J,{EvalFlags:()=>l,GetOwnPropertyNamesFlags:()=>y,IntrinsicsFlags:()=>E,IsEqualOp:()=>c,JSPromiseStateEnum:()=>x,assertSync:()=>u});module.exports=_(J);function u(t){return function(...o){let r=t(...o);if(r&&typeof r=="object"&&r instanceof Promise)throw new Error("Function unexpectedly returned a Promise");return r}}var l={JS_EVAL_TYPE_GLOBAL:0,JS_EVAL_TYPE_MODULE:1,JS_EVAL_TYPE_DIRECT:2,JS_EVAL_TYPE_INDIRECT:3,JS_EVAL_TYPE_MASK:3,JS_EVAL_FLAG_STRICT:8,JS_EVAL_FLAG_STRIP:16,JS_EVAL_FLAG_COMPILE_ONLY:32,JS_EVAL_FLAG_BACKTRACE_BARRIER:64},E={BaseObjects:1,Date:2,Eval:4,StringNormalize:8,RegExp:16,RegExpCompiler:32,JSON:64,Proxy:128,MapSet:256,TypedArrays:512,Promise:1024,BigInt:2048,BigFloat:4096,BigDecimal:8192,OperatorOverloading:16384,BignumExt:32768},x={Pending:0,Fulfilled:1,Rejected:2},y={JS_GPN_STRING_MASK:1,JS_GPN_SYMBOL_MASK:2,JS_GPN_PRIVATE_MASK:4,JS_GPN_ENUM_ONLY:16,JS_GPN_SET_ENUM:32,QTS_GPN_NUMBER_MASK:64,QTS_STANDARD_COMPLIANT_NUMBER:128},c={IsStrictlyEqual:0,IsSameValue:1,IsSameValueZero:2};0&&(module.exports={EvalFlags,GetOwnPropertyNamesFlags,IntrinsicsFlags,IsEqualOp,JSPromiseStateEnum,assertSync}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@jitl/quickjs-ffi-types", | ||
"version": "0.29.2", | ||
"version": "0.30.0", | ||
"license": "MIT", | ||
@@ -34,4 +34,4 @@ "repository": { | ||
"devDependencies": { | ||
"@jitl/tsconfig": "0.29.2" | ||
"@jitl/tsconfig": "0.30.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78557
551