@jitl/quickjs-ffi-types
Advanced tools
Comparing version 0.28.0 to 0.29.0
@@ -137,2 +137,11 @@ /** | ||
}; | ||
/** | ||
* State of a promise. | ||
*/ | ||
type JSPromiseStateEnum = Brand<(typeof JSPromiseStateEnum)[keyof typeof JSPromiseStateEnum], "JSPromiseStateEnum">; | ||
declare const JSPromiseStateEnum: { | ||
readonly Pending: 0; | ||
readonly Fulfilled: 1; | ||
readonly Rejected: 2; | ||
}; | ||
@@ -353,6 +362,9 @@ declare namespace Emscripten { | ||
QTS_Dump: (ctx: JSContextPointer, obj: JSValuePointer | JSValueConstPointer) => JSBorrowedCharPointer; | ||
QTS_Eval: (ctx: JSContextPointer, js_code: BorrowedHeapCharPointer, filename: string, detectModule: EvalDetectModule, evalFlags: EvalFlags) => JSValuePointer; | ||
QTS_Eval: (ctx: JSContextPointer, js_code: BorrowedHeapCharPointer, js_code_length: number, filename: string, detectModule: EvalDetectModule, evalFlags: EvalFlags) => JSValuePointer; | ||
QTS_GetModuleNamespace: (ctx: JSContextPointer, module_func_obj: JSValuePointer | JSValueConstPointer) => JSValuePointer; | ||
QTS_Typeof: (ctx: JSContextPointer, value: JSValuePointer | JSValueConstPointer) => OwnedHeapCharPointer; | ||
QTS_GetGlobalObject: (ctx: JSContextPointer) => JSValuePointer; | ||
QTS_NewPromiseCapability: (ctx: JSContextPointer, resolve_funcs_out: JSValuePointerPointer) => JSValuePointer; | ||
QTS_PromiseState: (ctx: JSContextPointer, promise: JSValuePointer | JSValueConstPointer) => JSPromiseStateEnum; | ||
QTS_PromiseResult: (ctx: JSContextPointer, promise: JSValuePointer | JSValueConstPointer) => JSValuePointer; | ||
QTS_TestStringArg: (string: string) => void; | ||
@@ -429,7 +441,10 @@ QTS_BuildIsDebug: () => number; | ||
QTS_Dump_MaybeAsync: (ctx: JSContextPointer, obj: JSValuePointer | JSValueConstPointer) => JSBorrowedCharPointer | Promise<JSBorrowedCharPointer>; | ||
QTS_Eval: (ctx: JSContextPointer, js_code: BorrowedHeapCharPointer, filename: string, detectModule: EvalDetectModule, evalFlags: EvalFlags) => JSValuePointer; | ||
QTS_Eval_MaybeAsync: (ctx: JSContextPointer, js_code: BorrowedHeapCharPointer, filename: string, detectModule: EvalDetectModule, evalFlags: EvalFlags) => JSValuePointer | Promise<JSValuePointer>; | ||
QTS_Eval: (ctx: JSContextPointer, js_code: BorrowedHeapCharPointer, js_code_length: number, filename: string, detectModule: EvalDetectModule, evalFlags: EvalFlags) => JSValuePointer; | ||
QTS_Eval_MaybeAsync: (ctx: JSContextPointer, js_code: BorrowedHeapCharPointer, js_code_length: number, filename: string, detectModule: EvalDetectModule, evalFlags: EvalFlags) => JSValuePointer | Promise<JSValuePointer>; | ||
QTS_GetModuleNamespace: (ctx: JSContextPointer, module_func_obj: JSValuePointer | JSValueConstPointer) => JSValuePointer; | ||
QTS_Typeof: (ctx: JSContextPointer, value: JSValuePointer | JSValueConstPointer) => OwnedHeapCharPointer; | ||
QTS_GetGlobalObject: (ctx: JSContextPointer) => JSValuePointer; | ||
QTS_NewPromiseCapability: (ctx: JSContextPointer, resolve_funcs_out: JSValuePointerPointer) => JSValuePointer; | ||
QTS_PromiseState: (ctx: JSContextPointer, promise: JSValuePointer | JSValueConstPointer) => JSPromiseStateEnum; | ||
QTS_PromiseResult: (ctx: JSContextPointer, promise: JSValuePointer | JSValueConstPointer) => JSValuePointer; | ||
QTS_TestStringArg: (string: string) => void; | ||
@@ -486,2 +501,2 @@ QTS_BuildIsDebug: () => 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, 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, 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 }; |
@@ -1,2 +0,2 @@ | ||
"use strict";var i=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var P=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},_=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a(e))!s.call(t,n)&&n!==o&&i(t,n,{get:()=>e[n],enumerable:!(r=p(e,n))||r.enumerable});return t};var u=t=>_(i({},"__esModule",{value:!0}),t);var x={};P(x,{EvalFlags:()=>c,IntrinsicsFlags:()=>l,assertSync:()=>S});module.exports=u(x);function S(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 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};0&&(module.exports={EvalFlags,IntrinsicsFlags,assertSync}); | ||
"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}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@jitl/quickjs-ffi-types", | ||
"version": "0.28.0", | ||
"version": "0.29.0", | ||
"license": "MIT", | ||
"repository": { | ||
@@ -18,2 +19,3 @@ "type": "git", | ||
"files": [ | ||
"LICENSE", | ||
"dist/**/*" | ||
@@ -33,4 +35,4 @@ ], | ||
"devDependencies": { | ||
"@jitl/tsconfig": "0.28.0" | ||
"@jitl/tsconfig": "0.29.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
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found
Found 1 instance in 1 package
69946
9
1
506