@suchipi/quickjs 0.2.0 → 0.3.0
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/LICENSE +1 -1
- package/README.md +66 -41
- package/build/aarch64-apple-darwin/bin/qjs +0 -0
- package/build/aarch64-apple-darwin/bin/qjsbootstrap +0 -0
- package/build/aarch64-apple-darwin/bin/qjsbootstrap-bytecode +0 -0
- package/build/aarch64-apple-darwin/bin/qjsc +0 -0
- package/build/aarch64-apple-darwin/bin/quickjs-run +0 -0
- package/build/aarch64-apple-darwin/extras/fib.so +0 -0
- package/build/aarch64-apple-darwin/extras/is-stdin-a-tty +0 -0
- package/build/aarch64-apple-darwin/extras/log-argv +0 -0
- package/build/aarch64-apple-darwin/extras/point.so +0 -0
- package/build/aarch64-apple-darwin/extras/run-test262 +0 -0
- package/build/aarch64-apple-darwin/extras/sample-program/sum +0 -0
- package/build/aarch64-apple-darwin/extras/stack-limit-test +0 -0
- package/build/aarch64-apple-darwin/lib/quickjs-core.a +0 -0
- package/build/aarch64-apple-darwin/lib/quickjs-full.a +0 -0
- package/build/aarch64-unknown-linux-gnu/bin/qjs +0 -0
- package/build/aarch64-unknown-linux-gnu/bin/qjsbootstrap +0 -0
- package/build/aarch64-unknown-linux-gnu/bin/qjsbootstrap-bytecode +0 -0
- package/build/aarch64-unknown-linux-gnu/bin/qjsc +0 -0
- package/build/aarch64-unknown-linux-gnu/bin/quickjs-run +0 -0
- package/build/aarch64-unknown-linux-gnu/extras/fib.so +0 -0
- package/build/aarch64-unknown-linux-gnu/extras/is-stdin-a-tty +0 -0
- package/build/aarch64-unknown-linux-gnu/extras/log-argv +0 -0
- package/build/aarch64-unknown-linux-gnu/extras/point.so +0 -0
- package/build/aarch64-unknown-linux-gnu/extras/run-test262 +0 -0
- package/build/aarch64-unknown-linux-gnu/extras/sample-program/sum +0 -0
- package/build/aarch64-unknown-linux-gnu/extras/stack-limit-test +0 -0
- package/build/aarch64-unknown-linux-gnu/lib/quickjs-core.a +0 -0
- package/build/aarch64-unknown-linux-gnu/lib/quickjs-full.a +0 -0
- package/build/aarch64-unknown-linux-musl/bin/qjs +0 -0
- package/build/aarch64-unknown-linux-musl/bin/qjsbootstrap +0 -0
- package/build/aarch64-unknown-linux-musl/bin/qjsbootstrap-bytecode +0 -0
- package/build/aarch64-unknown-linux-musl/bin/qjsc +0 -0
- package/build/aarch64-unknown-linux-musl/bin/quickjs-run +0 -0
- package/build/aarch64-unknown-linux-musl/extras/fib.so +0 -0
- package/build/aarch64-unknown-linux-musl/extras/is-stdin-a-tty +0 -0
- package/build/aarch64-unknown-linux-musl/extras/log-argv +0 -0
- package/build/aarch64-unknown-linux-musl/extras/point.so +0 -0
- package/build/aarch64-unknown-linux-musl/extras/run-test262 +0 -0
- package/build/aarch64-unknown-linux-musl/extras/sample-program/sum +0 -0
- package/build/aarch64-unknown-linux-musl/extras/stack-limit-test +0 -0
- package/build/aarch64-unknown-linux-musl/lib/quickjs-core.a +0 -0
- package/build/aarch64-unknown-linux-musl/lib/quickjs-full.a +0 -0
- package/build/aarch64-unknown-linux-static/bin/qjs +0 -0
- package/build/aarch64-unknown-linux-static/bin/qjsbootstrap +0 -0
- package/build/aarch64-unknown-linux-static/bin/qjsbootstrap-bytecode +0 -0
- package/build/aarch64-unknown-linux-static/bin/qjsc +0 -0
- package/build/aarch64-unknown-linux-static/bin/quickjs-run +0 -0
- package/build/aarch64-unknown-linux-static/extras/fib.so +0 -0
- package/build/aarch64-unknown-linux-static/extras/is-stdin-a-tty +0 -0
- package/build/aarch64-unknown-linux-static/extras/log-argv +0 -0
- package/build/aarch64-unknown-linux-static/extras/point.so +0 -0
- package/build/aarch64-unknown-linux-static/extras/run-test262 +0 -0
- package/build/aarch64-unknown-linux-static/extras/sample-program/sum +0 -0
- package/build/aarch64-unknown-linux-static/extras/stack-limit-test +0 -0
- package/build/aarch64-unknown-linux-static/lib/quickjs-core.a +0 -0
- package/build/aarch64-unknown-linux-static/lib/quickjs-full.a +0 -0
- package/build/{aarch64-unknown-linux-musl/dts → dts}/quickjs-libc.d.ts +0 -153
- package/build/{aarch64-unknown-linux-musl/dts → dts}/quickjs-libcontext.d.ts +0 -1
- package/build/{aarch64-apple-darwin/dts → dts}/quickjs.d.ts +12 -0
- package/build/x86_64-apple-darwin/bin/qjs +0 -0
- package/build/x86_64-apple-darwin/bin/qjsbootstrap +0 -0
- package/build/x86_64-apple-darwin/bin/qjsbootstrap-bytecode +0 -0
- package/build/x86_64-apple-darwin/bin/qjsc +0 -0
- package/build/x86_64-apple-darwin/bin/quickjs-run +0 -0
- package/build/x86_64-apple-darwin/extras/fib.so +0 -0
- package/build/x86_64-apple-darwin/extras/is-stdin-a-tty +0 -0
- package/build/x86_64-apple-darwin/extras/log-argv +0 -0
- package/build/x86_64-apple-darwin/extras/point.so +0 -0
- package/build/x86_64-apple-darwin/extras/run-test262 +0 -0
- package/build/x86_64-apple-darwin/extras/sample-program/sum +0 -0
- package/build/x86_64-apple-darwin/extras/stack-limit-test +0 -0
- package/build/x86_64-apple-darwin/lib/quickjs-core.a +0 -0
- package/build/x86_64-apple-darwin/lib/quickjs-full.a +0 -0
- package/build/x86_64-pc-windows-static/bin/qjs.exe +0 -0
- package/build/x86_64-pc-windows-static/bin/qjsbootstrap-bytecode.exe +0 -0
- package/build/x86_64-pc-windows-static/bin/qjsbootstrap.exe +0 -0
- package/build/x86_64-pc-windows-static/bin/qjsc.exe +0 -0
- package/build/x86_64-pc-windows-static/bin/quickjs-run.exe +0 -0
- package/build/x86_64-pc-windows-static/extras/fib.so +1 -0
- package/build/x86_64-pc-windows-static/extras/is-stdin-a-tty.exe +0 -0
- package/build/x86_64-pc-windows-static/extras/log-argv.exe +0 -0
- package/build/x86_64-pc-windows-static/extras/point.so +1 -0
- package/build/x86_64-pc-windows-static/extras/run-test262.exe +0 -0
- package/build/x86_64-pc-windows-static/extras/sample-program/sum.exe +0 -0
- package/build/x86_64-pc-windows-static/extras/stack-limit-test.exe +0 -0
- package/build/x86_64-pc-windows-static/lib/quickjs-core.a +0 -0
- package/build/x86_64-pc-windows-static/lib/quickjs-full.a +0 -0
- package/build/x86_64-unknown-linux-gnu/bin/qjs +0 -0
- package/build/x86_64-unknown-linux-gnu/bin/qjsbootstrap +0 -0
- package/build/x86_64-unknown-linux-gnu/bin/qjsbootstrap-bytecode +0 -0
- package/build/x86_64-unknown-linux-gnu/bin/qjsc +0 -0
- package/build/x86_64-unknown-linux-gnu/bin/quickjs-run +0 -0
- package/build/x86_64-unknown-linux-gnu/extras/fib.so +0 -0
- package/build/x86_64-unknown-linux-gnu/extras/is-stdin-a-tty +0 -0
- package/build/x86_64-unknown-linux-gnu/extras/log-argv +0 -0
- package/build/x86_64-unknown-linux-gnu/extras/point.so +0 -0
- package/build/x86_64-unknown-linux-gnu/extras/run-test262 +0 -0
- package/build/x86_64-unknown-linux-gnu/extras/sample-program/sum +0 -0
- package/build/x86_64-unknown-linux-gnu/extras/stack-limit-test +0 -0
- package/build/x86_64-unknown-linux-gnu/lib/quickjs-core.a +0 -0
- package/build/x86_64-unknown-linux-gnu/lib/quickjs-full.a +0 -0
- package/build/x86_64-unknown-linux-musl/bin/qjs +0 -0
- package/build/x86_64-unknown-linux-musl/bin/qjsbootstrap +0 -0
- package/build/x86_64-unknown-linux-musl/bin/qjsbootstrap-bytecode +0 -0
- package/build/x86_64-unknown-linux-musl/bin/qjsc +0 -0
- package/build/x86_64-unknown-linux-musl/bin/quickjs-run +0 -0
- package/build/x86_64-unknown-linux-musl/extras/fib.so +0 -0
- package/build/x86_64-unknown-linux-musl/extras/is-stdin-a-tty +0 -0
- package/build/x86_64-unknown-linux-musl/extras/log-argv +0 -0
- package/build/x86_64-unknown-linux-musl/extras/point.so +0 -0
- package/build/x86_64-unknown-linux-musl/extras/run-test262 +0 -0
- package/build/x86_64-unknown-linux-musl/extras/sample-program/sum +0 -0
- package/build/x86_64-unknown-linux-musl/extras/stack-limit-test +0 -0
- package/build/x86_64-unknown-linux-musl/lib/quickjs-core.a +0 -0
- package/build/x86_64-unknown-linux-musl/lib/quickjs-full.a +0 -0
- package/build/x86_64-unknown-linux-static/bin/qjs +0 -0
- package/build/x86_64-unknown-linux-static/bin/qjsbootstrap +0 -0
- package/build/x86_64-unknown-linux-static/bin/qjsbootstrap-bytecode +0 -0
- package/build/x86_64-unknown-linux-static/bin/qjsc +0 -0
- package/build/x86_64-unknown-linux-static/bin/quickjs-run +0 -0
- package/build/x86_64-unknown-linux-static/extras/fib.so +0 -0
- package/build/x86_64-unknown-linux-static/extras/is-stdin-a-tty +0 -0
- package/build/x86_64-unknown-linux-static/extras/log-argv +0 -0
- package/build/x86_64-unknown-linux-static/extras/point.so +0 -0
- package/build/x86_64-unknown-linux-static/extras/run-test262 +0 -0
- package/build/x86_64-unknown-linux-static/extras/sample-program/sum +0 -0
- package/build/x86_64-unknown-linux-static/extras/stack-limit-test +0 -0
- package/build/x86_64-unknown-linux-static/lib/quickjs-core.a +0 -0
- package/build/x86_64-unknown-linux-static/lib/quickjs-full.a +0 -0
- package/package.json +1 -1
- package/tsconfig.json +12 -3
- package/build/aarch64-apple-darwin/dts/quickjs-libc.d.ts +0 -1355
- package/build/aarch64-apple-darwin/dts/quickjs-libcontext.d.ts +0 -179
- package/build/aarch64-unknown-linux-gnu/dts/inspect.d.ts +0 -123
- package/build/aarch64-unknown-linux-gnu/dts/quickjs-libbytecode.d.ts +0 -24
- package/build/aarch64-unknown-linux-gnu/dts/quickjs-libc.d.ts +0 -1355
- package/build/aarch64-unknown-linux-gnu/dts/quickjs-libcontext.d.ts +0 -179
- package/build/aarch64-unknown-linux-gnu/dts/quickjs-libpointer.d.ts +0 -14
- package/build/aarch64-unknown-linux-gnu/dts/quickjs.d.ts +0 -859
- package/build/aarch64-unknown-linux-musl/dts/inspect.d.ts +0 -123
- package/build/aarch64-unknown-linux-musl/dts/quickjs-libbytecode.d.ts +0 -24
- package/build/aarch64-unknown-linux-musl/dts/quickjs-libpointer.d.ts +0 -14
- package/build/aarch64-unknown-linux-musl/dts/quickjs.d.ts +0 -859
- package/build/aarch64-unknown-linux-static/dts/inspect.d.ts +0 -123
- package/build/aarch64-unknown-linux-static/dts/quickjs-libbytecode.d.ts +0 -24
- package/build/aarch64-unknown-linux-static/dts/quickjs-libc.d.ts +0 -1355
- package/build/aarch64-unknown-linux-static/dts/quickjs-libcontext.d.ts +0 -179
- package/build/aarch64-unknown-linux-static/dts/quickjs-libpointer.d.ts +0 -14
- package/build/aarch64-unknown-linux-static/dts/quickjs.d.ts +0 -859
- package/build/x86_64-apple-darwin/dts/inspect.d.ts +0 -123
- package/build/x86_64-apple-darwin/dts/quickjs-libbytecode.d.ts +0 -24
- package/build/x86_64-apple-darwin/dts/quickjs-libc.d.ts +0 -1355
- package/build/x86_64-apple-darwin/dts/quickjs-libcontext.d.ts +0 -179
- package/build/x86_64-apple-darwin/dts/quickjs-libpointer.d.ts +0 -14
- package/build/x86_64-apple-darwin/dts/quickjs.d.ts +0 -859
- package/build/x86_64-pc-windows-static/dts/inspect.d.ts +0 -123
- package/build/x86_64-pc-windows-static/dts/quickjs-libbytecode.d.ts +0 -24
- package/build/x86_64-pc-windows-static/dts/quickjs-libc.d.ts +0 -1355
- package/build/x86_64-pc-windows-static/dts/quickjs-libcontext.d.ts +0 -179
- package/build/x86_64-pc-windows-static/dts/quickjs-libpointer.d.ts +0 -14
- package/build/x86_64-pc-windows-static/dts/quickjs.d.ts +0 -859
- package/build/x86_64-unknown-linux-gnu/dts/inspect.d.ts +0 -123
- package/build/x86_64-unknown-linux-gnu/dts/quickjs-libbytecode.d.ts +0 -24
- package/build/x86_64-unknown-linux-gnu/dts/quickjs-libc.d.ts +0 -1355
- package/build/x86_64-unknown-linux-gnu/dts/quickjs-libcontext.d.ts +0 -179
- package/build/x86_64-unknown-linux-gnu/dts/quickjs-libpointer.d.ts +0 -14
- package/build/x86_64-unknown-linux-gnu/dts/quickjs.d.ts +0 -859
- package/build/x86_64-unknown-linux-musl/dts/inspect.d.ts +0 -123
- package/build/x86_64-unknown-linux-musl/dts/quickjs-libbytecode.d.ts +0 -24
- package/build/x86_64-unknown-linux-musl/dts/quickjs-libc.d.ts +0 -1355
- package/build/x86_64-unknown-linux-musl/dts/quickjs-libcontext.d.ts +0 -179
- package/build/x86_64-unknown-linux-musl/dts/quickjs-libpointer.d.ts +0 -14
- package/build/x86_64-unknown-linux-musl/dts/quickjs.d.ts +0 -859
- package/build/x86_64-unknown-linux-static/dts/inspect.d.ts +0 -123
- package/build/x86_64-unknown-linux-static/dts/quickjs-libbytecode.d.ts +0 -24
- package/build/x86_64-unknown-linux-static/dts/quickjs-libc.d.ts +0 -1355
- package/build/x86_64-unknown-linux-static/dts/quickjs-libcontext.d.ts +0 -179
- package/build/x86_64-unknown-linux-static/dts/quickjs-libpointer.d.ts +0 -14
- package/build/x86_64-unknown-linux-static/dts/quickjs.d.ts +0 -859
- /package/build/{aarch64-apple-darwin/dts → dts}/inspect.d.ts +0 -0
- /package/build/{aarch64-apple-darwin/dts → dts}/quickjs-libbytecode.d.ts +0 -0
- /package/build/{aarch64-apple-darwin/dts → dts}/quickjs-libpointer.d.ts +0 -0
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
declare module "quickjs:context" {
|
|
2
|
-
/**
|
|
3
|
-
* A separate global context (or 'realm') within which code can be executed.
|
|
4
|
-
*/
|
|
5
|
-
export class Context {
|
|
6
|
-
/**
|
|
7
|
-
* Create a new global context (or 'realm') within code can be executed.
|
|
8
|
-
*
|
|
9
|
-
* @param options Options for what globals/modules/etc to make available within the context.
|
|
10
|
-
*
|
|
11
|
-
* The following globals are always present, regardless of options:
|
|
12
|
-
*
|
|
13
|
-
* - Object
|
|
14
|
-
* - Function
|
|
15
|
-
* - Error
|
|
16
|
-
* - EvalError
|
|
17
|
-
* - RangeError
|
|
18
|
-
* - ReferenceError
|
|
19
|
-
* - SyntaxError
|
|
20
|
-
* - TypeError
|
|
21
|
-
* - URIError
|
|
22
|
-
* - InternalError
|
|
23
|
-
* - AggregateError
|
|
24
|
-
* - Array
|
|
25
|
-
* - parseInt
|
|
26
|
-
* - parseFloat
|
|
27
|
-
* - isNaN
|
|
28
|
-
* - isFinite
|
|
29
|
-
* - decodeURI
|
|
30
|
-
* - decodeURIComponent
|
|
31
|
-
* - encodeURI
|
|
32
|
-
* - encodeURIComponent
|
|
33
|
-
* - escape
|
|
34
|
-
* - unescape
|
|
35
|
-
* - Infinity
|
|
36
|
-
* - NaN
|
|
37
|
-
* - undefined
|
|
38
|
-
* - __date_clock
|
|
39
|
-
* - Number
|
|
40
|
-
* - Boolean
|
|
41
|
-
* - String
|
|
42
|
-
* - Math
|
|
43
|
-
* - Reflect
|
|
44
|
-
* - Symbol
|
|
45
|
-
* - eval (but it doesn't work unless the `eval` option is enabled)
|
|
46
|
-
* - globalThis
|
|
47
|
-
*/
|
|
48
|
-
constructor(options?: {
|
|
49
|
-
/** Enables `Date`. Defaults to `true` */
|
|
50
|
-
date?: boolean;
|
|
51
|
-
|
|
52
|
-
/** Enables `eval`. Defaults to `true` */
|
|
53
|
-
eval?: boolean;
|
|
54
|
-
|
|
55
|
-
/** Enables `String.prototype.normalize`. Defaults to `true`. */
|
|
56
|
-
stringNormalize?: boolean;
|
|
57
|
-
|
|
58
|
-
/** Enables `RegExp`. Defaults to `true`. */
|
|
59
|
-
regExp?: boolean;
|
|
60
|
-
|
|
61
|
-
/** Enables `JSON`. Defaults to `true`. */
|
|
62
|
-
json?: boolean;
|
|
63
|
-
|
|
64
|
-
/** Enables `Proxy`. Defaults to `true`. */
|
|
65
|
-
proxy?: boolean;
|
|
66
|
-
|
|
67
|
-
/** Enables `Map` and `Set`. Defaults to `true`. */
|
|
68
|
-
mapSet?: boolean;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Enables:
|
|
72
|
-
*
|
|
73
|
-
* - ArrayBuffer
|
|
74
|
-
* - SharedArrayBuffer
|
|
75
|
-
* - Uint8ClampedArray
|
|
76
|
-
* - Int8Array
|
|
77
|
-
* - Uint8Array
|
|
78
|
-
* - Int16Array
|
|
79
|
-
* - Uint16Array
|
|
80
|
-
* - Int32Array
|
|
81
|
-
* - Uint32Array
|
|
82
|
-
* - BigInt64Array
|
|
83
|
-
* - BigUint64Array
|
|
84
|
-
* - Float32Array
|
|
85
|
-
* - Float64Array
|
|
86
|
-
* - DataView
|
|
87
|
-
*
|
|
88
|
-
* Defaults to `true`.
|
|
89
|
-
*/
|
|
90
|
-
typedArrays?: boolean;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Enables:
|
|
94
|
-
*
|
|
95
|
-
* - Promise
|
|
96
|
-
* - async functions
|
|
97
|
-
* - async iterators
|
|
98
|
-
* - async generators
|
|
99
|
-
*
|
|
100
|
-
* Defaults to `true`.
|
|
101
|
-
*/
|
|
102
|
-
promise?: boolean;
|
|
103
|
-
|
|
104
|
-
/** Enables `BigInt`. Defaults to `true`. */
|
|
105
|
-
bigint?: boolean;
|
|
106
|
-
|
|
107
|
-
/** Enables `BigFloat`. Defaults to `true`. */
|
|
108
|
-
bigfloat?: boolean;
|
|
109
|
-
|
|
110
|
-
/** Enables `BigDecimal`. Defaults to `true`. */
|
|
111
|
-
bigdecimal?: boolean;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Enables:
|
|
115
|
-
*
|
|
116
|
-
* - Operators
|
|
117
|
-
* - OperatorSet creation
|
|
118
|
-
* - operator overloading
|
|
119
|
-
*
|
|
120
|
-
* Defaults to `true`.
|
|
121
|
-
*/
|
|
122
|
-
operators?: boolean;
|
|
123
|
-
|
|
124
|
-
/** Enables "use math". Defaults to `true`. */
|
|
125
|
-
useMath?: boolean;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Enables:
|
|
129
|
-
*
|
|
130
|
-
* - inspect
|
|
131
|
-
* - console
|
|
132
|
-
* - print
|
|
133
|
-
* - require (and require.resolve)
|
|
134
|
-
* - setTimeout
|
|
135
|
-
* - clearTimeout
|
|
136
|
-
* - setInterval
|
|
137
|
-
* - clearInterval
|
|
138
|
-
* - String.cooked
|
|
139
|
-
* - String.dedent
|
|
140
|
-
*
|
|
141
|
-
* Defaults to `true`.
|
|
142
|
-
*
|
|
143
|
-
* NOTE: The following globals, normally part of `js_std_add_helpers`, are NEVER added:
|
|
144
|
-
*
|
|
145
|
-
* - Module
|
|
146
|
-
* - scriptArgs
|
|
147
|
-
*
|
|
148
|
-
* If you need them in the new context, copy them over from your context's globalThis onto the child context's globalThis.
|
|
149
|
-
*/
|
|
150
|
-
stdHelpers?: boolean;
|
|
151
|
-
|
|
152
|
-
/** Enable builtin modules. */
|
|
153
|
-
modules?: {
|
|
154
|
-
/** Enables the "quickjs:std" module. Defaults to `true`. */
|
|
155
|
-
"quickjs:std"?: boolean;
|
|
156
|
-
/** Enables the "quickjs:os" module. Defaults to `true`. */
|
|
157
|
-
"quickjs:os"?: boolean;
|
|
158
|
-
/** Enables the "quickjs:bytecode" module. Defaults to `true`. */
|
|
159
|
-
"quickjs:bytecode"?: boolean;
|
|
160
|
-
/** Enables the "quickjs:context" module. Defaults to `true`. */
|
|
161
|
-
"quickjs:context"?: boolean;
|
|
162
|
-
};
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* The `globalThis` object used by this context.
|
|
167
|
-
*
|
|
168
|
-
* You can add to or remove from it to change what is visible to the context.
|
|
169
|
-
*/
|
|
170
|
-
globalThis: typeof globalThis;
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Runs code within the context and returns the result.
|
|
174
|
-
*
|
|
175
|
-
* @param code The code to run.
|
|
176
|
-
*/
|
|
177
|
-
eval(code: string): any;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/** npm: @suchipi/print@2.3.0. License: ISC */
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
Copyright (c) 2016-2022, John Gardner
|
|
5
|
-
Copyright (c) 2022 Lily Skye
|
|
6
|
-
|
|
7
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
8
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
9
|
-
copyright notice and this permission notice appear in all copies.
|
|
10
|
-
|
|
11
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
12
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
13
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
14
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
15
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
16
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
17
|
-
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Options for {@link inspect}.
|
|
22
|
-
*/
|
|
23
|
-
declare interface InspectOptions {
|
|
24
|
-
/** Whether to display non-enumerable properties. Defaults to false. */
|
|
25
|
-
all?: boolean;
|
|
26
|
-
|
|
27
|
-
/** Whether to invoke getter functions. Defaults to false. */
|
|
28
|
-
followGetters?: boolean;
|
|
29
|
-
|
|
30
|
-
/** Whether to display the indexes of iterable entries. Defaults to false. */
|
|
31
|
-
indexes?: boolean;
|
|
32
|
-
|
|
33
|
-
/** Hide object details after 𝑁 recursions. Defaults to Infinity. */
|
|
34
|
-
maxDepth?: number;
|
|
35
|
-
|
|
36
|
-
/** If true, don't identify well-known symbols as `@@…`. Defaults to false. */
|
|
37
|
-
noAmp?: boolean;
|
|
38
|
-
|
|
39
|
-
/** If true, don't format byte-arrays as hexadecimal. Defaults to false. */
|
|
40
|
-
noHex?: boolean;
|
|
41
|
-
|
|
42
|
-
/** If true, don't display function source code. Defaults to false. */
|
|
43
|
-
noSource?: boolean;
|
|
44
|
-
|
|
45
|
-
/** Whether to show `__proto__` properties if possible. Defaults to false. */
|
|
46
|
-
proto?: boolean;
|
|
47
|
-
|
|
48
|
-
/** Whether to sort properties alphabetically. When false, properties are sorted by creation order. Defaults to false. */
|
|
49
|
-
sort?: boolean;
|
|
50
|
-
|
|
51
|
-
/** Options that control whether and how ANSI terminal escape sequences for colours should be added to the output. Defaults to false, meaning no colours. */
|
|
52
|
-
colours?: boolean | 256 | 8 | InspectColours;
|
|
53
|
-
|
|
54
|
-
/** Prefix string to use for indentation. Defaults to '\t'. */
|
|
55
|
-
indent?: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
declare interface InspectColours {
|
|
59
|
-
off?: string | number;
|
|
60
|
-
red?: string | number;
|
|
61
|
-
grey?: string | number;
|
|
62
|
-
green?: string | number;
|
|
63
|
-
darkGreen?: string | number;
|
|
64
|
-
punct?: string | number;
|
|
65
|
-
keys?: string | number;
|
|
66
|
-
keyEscape?: string | number;
|
|
67
|
-
typeColour?: string | number;
|
|
68
|
-
primitive?: string | number;
|
|
69
|
-
escape?: string | number;
|
|
70
|
-
date?: string | number;
|
|
71
|
-
hexBorder?: string | number;
|
|
72
|
-
hexValue?: string | number;
|
|
73
|
-
hexOffset?: string | number;
|
|
74
|
-
reference?: string | number;
|
|
75
|
-
srcBorder?: string | number;
|
|
76
|
-
srcRowNum?: string | number;
|
|
77
|
-
srcRowText?: string | number;
|
|
78
|
-
nul?: string | number;
|
|
79
|
-
nulProt?: string | number;
|
|
80
|
-
undef?: string | number;
|
|
81
|
-
noExts?: string | number;
|
|
82
|
-
frozen?: string | number;
|
|
83
|
-
sealed?: string | number;
|
|
84
|
-
regex?: string | number;
|
|
85
|
-
string?: string | number;
|
|
86
|
-
symbol?: string | number;
|
|
87
|
-
symbolFade?: string | number;
|
|
88
|
-
braces?: string | number;
|
|
89
|
-
quotes?: string | number;
|
|
90
|
-
empty?: string | number;
|
|
91
|
-
dot?: string | number;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
declare interface InspectFunction {
|
|
95
|
-
/**
|
|
96
|
-
* Generate a human-readable representation of a value.
|
|
97
|
-
*
|
|
98
|
-
* @param value - Value to inspect
|
|
99
|
-
* @param options - Additional settings for refining output
|
|
100
|
-
* @returns A string representation of `value`.
|
|
101
|
-
*/
|
|
102
|
-
(value: any, options?: InspectOptions): string;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Generate a human-readable representation of a value.
|
|
106
|
-
*
|
|
107
|
-
* @param value - Value to inspect
|
|
108
|
-
* @param key - The value's corresponding member name
|
|
109
|
-
* @param options - Additional settings for refining output
|
|
110
|
-
* @returns A string representation of `value`.
|
|
111
|
-
*/
|
|
112
|
-
(value: any, key?: string | symbol, options?: InspectOptions): string;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Generate a human-readable representation of a value.
|
|
117
|
-
*
|
|
118
|
-
* @param value - Value to inspect
|
|
119
|
-
* @param key - The value's corresponding member name
|
|
120
|
-
* @param options - Additional settings for refining output
|
|
121
|
-
* @returns A string representation of `value`.
|
|
122
|
-
*/
|
|
123
|
-
declare var inspect: InspectFunction;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
declare module "quickjs:bytecode" {
|
|
2
|
-
/**
|
|
3
|
-
* Convert the module or script in the specified file into bytecode.
|
|
4
|
-
*
|
|
5
|
-
* When converted back to a value, it will be a function.
|
|
6
|
-
*/
|
|
7
|
-
export function fromFile(
|
|
8
|
-
path: string,
|
|
9
|
-
options?: { byteSwap?: boolean; sourceType?: "module" | "script" }
|
|
10
|
-
): ArrayBuffer;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Convert the provided value into bytecode. Doesn't work with all values.
|
|
14
|
-
*/
|
|
15
|
-
export function fromValue(
|
|
16
|
-
value: any,
|
|
17
|
-
options?: { byteSwap?: boolean }
|
|
18
|
-
): ArrayBuffer;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Convert the provided bytecode into a value.
|
|
22
|
-
*/
|
|
23
|
-
export function toValue(bytecode: ArrayBuffer): any;
|
|
24
|
-
}
|