@girs/javascriptcore-6.0 2.39.90-3.0.0-beta.12

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.
@@ -0,0 +1,1766 @@
1
+
2
+ /*
3
+ * Type Definitions for Gjs (https://gjs.guide/)
4
+ *
5
+ * These type definitions are automatically generated, do not edit them by hand.
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
7
+ */
8
+ /**
9
+ * JavaScriptCore-6.0
10
+ */
11
+
12
+ import type GObject from '@girs/gobject-2.0';
13
+ import type GLib from '@girs/glib-2.0';
14
+
15
+ export namespace JavaScriptCore {
16
+
17
+ /**
18
+ * Enum values to specify a mode to check for syntax errors in jsc_context_check_syntax().
19
+ */
20
+ enum CheckSyntaxMode {
21
+ /**
22
+ * mode to check syntax of a script
23
+ */
24
+ SCRIPT,
25
+ /**
26
+ * mode to check syntax of a module
27
+ */
28
+ MODULE,
29
+ }
30
+ /**
31
+ * Enum values to specify the result of jsc_context_check_syntax().
32
+ */
33
+ enum CheckSyntaxResult {
34
+ /**
35
+ * no errors
36
+ */
37
+ SUCCESS,
38
+ /**
39
+ * recoverable syntax error
40
+ */
41
+ RECOVERABLE_ERROR,
42
+ /**
43
+ * irrecoverable syntax error
44
+ */
45
+ IRRECOVERABLE_ERROR,
46
+ /**
47
+ * unterminated literal error
48
+ */
49
+ UNTERMINATED_LITERAL_ERROR,
50
+ /**
51
+ * out of memory error
52
+ */
53
+ OUT_OF_MEMORY_ERROR,
54
+ /**
55
+ * stack overflow error
56
+ */
57
+ STACK_OVERFLOW_ERROR,
58
+ }
59
+ /**
60
+ * Enum values for options types.
61
+ */
62
+ enum OptionType {
63
+ /**
64
+ * A #gboolean option type.
65
+ */
66
+ BOOLEAN,
67
+ /**
68
+ * A #gint option type.
69
+ */
70
+ INT,
71
+ /**
72
+ * A #guint option type.
73
+ */
74
+ UINT,
75
+ /**
76
+ * A #gsize options type.
77
+ */
78
+ SIZE,
79
+ /**
80
+ * A #gdouble options type.
81
+ */
82
+ DOUBLE,
83
+ /**
84
+ * A string option type.
85
+ */
86
+ STRING,
87
+ /**
88
+ * A range string option type.
89
+ */
90
+ RANGE_STRING,
91
+ }
92
+ /**
93
+ * Possible types of the elements contained in a typed array.
94
+ */
95
+ enum TypedArrayType {
96
+ /**
97
+ * Not a typed array, or type unsupported.
98
+ */
99
+ NONE,
100
+ /**
101
+ * Array elements are 8-bit signed integers (int8_t).
102
+ */
103
+ INT8,
104
+ /**
105
+ * Array elements are 16-bit signed integers (int16_t).
106
+ */
107
+ INT16,
108
+ /**
109
+ * Array elements are 32-bit signed integers (int32_t).
110
+ */
111
+ INT32,
112
+ /**
113
+ * Array elements are 64-bit signed integers (int64_t).
114
+ */
115
+ INT64,
116
+ /**
117
+ * Array elements are 8-bit unsigned integers (uint8_t).
118
+ */
119
+ UINT8,
120
+ /**
121
+ * Array elements are 8-bit unsigned integers (uint8_t).
122
+ */
123
+ UINT8_CLAMPED,
124
+ /**
125
+ * Array elements are 16-bit unsigned integers (uint16_t).
126
+ */
127
+ UINT16,
128
+ /**
129
+ * Array elements are 32-bit unsigned integers (uint32_t).
130
+ */
131
+ UINT32,
132
+ /**
133
+ * Array elements are 64-bit unsigned integers (uint64_t).
134
+ */
135
+ UINT64,
136
+ /**
137
+ * Array elements are 32-bit floating point numbers (float).
138
+ */
139
+ FLOAT32,
140
+ /**
141
+ * Array elements are 64-bit floating point numbers (double).
142
+ */
143
+ FLOAT64,
144
+ }
145
+ /**
146
+ * Flags used when defining properties with jsc_value_object_define_property_data() and
147
+ * jsc_value_object_define_property_accessor().
148
+ * @bitfield
149
+ */
150
+ enum ValuePropertyFlags {
151
+ /**
152
+ * the type of the property descriptor may be changed and the
153
+ * property may be deleted from the corresponding object.
154
+ */
155
+ CONFIGURABLE,
156
+ /**
157
+ * the property shows up during enumeration of the properties on
158
+ * the corresponding object.
159
+ */
160
+ ENUMERABLE,
161
+ /**
162
+ * the value associated with the property may be changed with an
163
+ * assignment operator. This doesn't have any effect when passed to jsc_value_object_define_property_accessor().
164
+ */
165
+ WRITABLE,
166
+ }
167
+ /**
168
+ * Like jsc_get_major_version(), but from the headers used at
169
+ * application compile time, rather than from the library linked
170
+ * against at application run time.
171
+ */
172
+ const MAJOR_VERSION: number
173
+ /**
174
+ * Like jsc_get_micro_version(), but from the headers used at
175
+ * application compile time, rather than from the library linked
176
+ * against at application run time.
177
+ */
178
+ const MICRO_VERSION: number
179
+ /**
180
+ * Like jsc_get_minor_version(), but from the headers used at
181
+ * application compile time, rather than from the library linked
182
+ * against at application run time.
183
+ */
184
+ const MINOR_VERSION: number
185
+ /**
186
+ * Allows the DFG JIT to be used if %TRUE.
187
+ * Option type: %JSC_OPTION_BOOLEAN
188
+ * Default value: %TRUE.
189
+ */
190
+ const OPTIONS_USE_DFG: string | null
191
+ /**
192
+ * Allows the FTL JIT to be used if %TRUE.
193
+ * Option type: %JSC_OPTION_BOOLEAN
194
+ * Default value: %TRUE.
195
+ */
196
+ const OPTIONS_USE_FTL: string | null
197
+ /**
198
+ * Allows the executable pages to be allocated for JIT and thunks if %TRUE.
199
+ * Option type: %JSC_OPTION_BOOLEAN
200
+ * Default value: %TRUE.
201
+ */
202
+ const OPTIONS_USE_JIT: string | null
203
+ /**
204
+ * Allows the LLINT to be used if %TRUE.
205
+ * Option type: %JSC_OPTION_BOOLEAN
206
+ * Default value: %TRUE.
207
+ */
208
+ const OPTIONS_USE_LLINT: string | null
209
+ /**
210
+ * Returns the major version number of the JavaScriptCore library.
211
+ * (e.g. in JavaScriptCore version 1.8.3 this is 1.)
212
+ *
213
+ * This function is in the library, so it represents the JavaScriptCore library
214
+ * your code is running against. Contrast with the #JSC_MAJOR_VERSION
215
+ * macro, which represents the major version of the JavaScriptCore headers you
216
+ * have included when compiling your code.
217
+ * @returns the major version number of the JavaScriptCore library
218
+ */
219
+ function get_major_version(): number
220
+ /**
221
+ * Returns the micro version number of the JavaScriptCore library.
222
+ * (e.g. in JavaScriptCore version 1.8.3 this is 3.)
223
+ *
224
+ * This function is in the library, so it represents the JavaScriptCore library
225
+ * your code is running against. Contrast with the #JSC_MICRO_VERSION
226
+ * macro, which represents the micro version of the JavaScriptCore headers you
227
+ * have included when compiling your code.
228
+ * @returns the micro version number of the JavaScriptCore library
229
+ */
230
+ function get_micro_version(): number
231
+ /**
232
+ * Returns the minor version number of the JavaScriptCore library.
233
+ * (e.g. in JavaScriptCore version 1.8.3 this is 8.)
234
+ *
235
+ * This function is in the library, so it represents the JavaScriptCore library
236
+ * your code is running against. Contrast with the #JSC_MINOR_VERSION
237
+ * macro, which represents the minor version of the JavaScriptCore headers you
238
+ * have included when compiling your code.
239
+ * @returns the minor version number of the JavaScriptCore library
240
+ */
241
+ function get_minor_version(): number
242
+ /**
243
+ * Iterates all available options calling `function` for each one. Iteration can
244
+ * stop early if `function` returns %FALSE.
245
+ * @param function_ a #JSCOptionsFunc callback
246
+ */
247
+ function options_foreach(function_: OptionsFunc): void
248
+ /**
249
+ * Get `option` as a #gboolean value.
250
+ * @param option the option identifier
251
+ * @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
252
+ */
253
+ function options_get_boolean(option: string | null): [ /* returnType */ boolean, /* value */ boolean ]
254
+ /**
255
+ * Get `option` as a #gdouble value.
256
+ * @param option the option identifier
257
+ * @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
258
+ */
259
+ function options_get_double(option: string | null): [ /* returnType */ boolean, /* value */ number ]
260
+ /**
261
+ * Get `option` as a #gint value.
262
+ * @param option the option identifier
263
+ * @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
264
+ */
265
+ function options_get_int(option: string | null): [ /* returnType */ boolean, /* value */ number ]
266
+ /**
267
+ * Create a #GOptionGroup to handle JSCOptions as command line arguments.
268
+ * The options will be exposed as command line arguments with the form
269
+ * <emphasis>--jsc-&lt;option&gt;=&lt;value&gt;</emphasis>.
270
+ * Each entry in the returned #GOptionGroup is configured to apply the
271
+ * corresponding option during command line parsing. Applications only need to
272
+ * pass the returned group to g_option_context_add_group(), and the rest will
273
+ * be taken care for automatically.
274
+ * @returns a #GOptionGroup for the JSCOptions
275
+ */
276
+ function options_get_option_group(): GLib.OptionGroup
277
+ /**
278
+ * Get `option` as a range string. The string must be in the
279
+ * format <emphasis>[!]&lt;low&gt;[:&lt;high&gt;]</emphasis> where low and high are #guint values.
280
+ * Values between low and high (both included) will be considered in
281
+ * the range, unless <emphasis>!</emphasis> is used to invert the range.
282
+ * @param option the option identifier
283
+ * @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
284
+ */
285
+ function options_get_range_string(option: string | null): [ /* returnType */ boolean, /* value */ string | null ]
286
+ /**
287
+ * Get `option` as a #gsize value.
288
+ * @param option the option identifier
289
+ * @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
290
+ */
291
+ function options_get_size(option: string | null): [ /* returnType */ boolean, /* value */ number ]
292
+ /**
293
+ * Get `option` as a string.
294
+ * @param option the option identifier
295
+ * @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
296
+ */
297
+ function options_get_string(option: string | null): [ /* returnType */ boolean, /* value */ string | null ]
298
+ /**
299
+ * Get `option` as a #guint value.
300
+ * @param option the option identifier
301
+ * @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
302
+ */
303
+ function options_get_uint(option: string | null): [ /* returnType */ boolean, /* value */ number ]
304
+ /**
305
+ * Set `option` as a #gboolean value.
306
+ * @param option the option identifier
307
+ * @param value the value to set
308
+ * @returns %TRUE if option was correctly set or %FALSE otherwise.
309
+ */
310
+ function options_set_boolean(option: string | null, value: boolean): boolean
311
+ /**
312
+ * Set `option` as a #gdouble value.
313
+ * @param option the option identifier
314
+ * @param value the value to set
315
+ * @returns %TRUE if option was correctly set or %FALSE otherwise.
316
+ */
317
+ function options_set_double(option: string | null, value: number): boolean
318
+ /**
319
+ * Set `option` as a #gint value.
320
+ * @param option the option identifier
321
+ * @param value the value to set
322
+ * @returns %TRUE if option was correctly set or %FALSE otherwise.
323
+ */
324
+ function options_set_int(option: string | null, value: number): boolean
325
+ /**
326
+ * Set `option` as a range string. The string must be in the
327
+ * format <emphasis>[!]&lt;low&gt;[:&lt;high&gt;]</emphasis> where low and high are #guint values.
328
+ * Values between low and high (both included) will be considered in
329
+ * the range, unless <emphasis>!</emphasis> is used to invert the range.
330
+ * @param option the option identifier
331
+ * @param value the value to set
332
+ * @returns %TRUE if option was correctly set or %FALSE otherwise.
333
+ */
334
+ function options_set_range_string(option: string | null, value: string | null): boolean
335
+ /**
336
+ * Set `option` as a #gsize value.
337
+ * @param option the option identifier
338
+ * @param value the value to set
339
+ * @returns %TRUE if option was correctly set or %FALSE otherwise.
340
+ */
341
+ function options_set_size(option: string | null, value: number): boolean
342
+ /**
343
+ * Set `option` as a string.
344
+ * @param option the option identifier
345
+ * @param value the value to set
346
+ * @returns %TRUE if option was correctly set or %FALSE otherwise.
347
+ */
348
+ function options_set_string(option: string | null, value: string | null): boolean
349
+ /**
350
+ * Set `option` as a #guint value.
351
+ * @param option the option identifier
352
+ * @param value the value to set
353
+ * @returns %TRUE if option was correctly set or %FALSE otherwise.
354
+ */
355
+ function options_set_uint(option: string | null, value: number): boolean
356
+ /**
357
+ * The type of delete_property in #JSCClassVTable. This is only required when you need to handle
358
+ * external properties not added to the prototype.
359
+ * @callback
360
+ * @param jsc_class a #JSCClass
361
+ * @param context a #JSCContext
362
+ * @param instance the `jsc_class` instance
363
+ * @param name the property name
364
+ * @returns %TRUE if handled or %FALSE to to forward the request to the parent class or prototype chain.
365
+ */
366
+ interface ClassDeletePropertyFunction {
367
+ (jsc_class: Class, context: Context, instance: any | null, name: string | null): boolean
368
+ }
369
+ /**
370
+ * The type of enumerate_properties in #JSCClassVTable. This is only required when you need to handle
371
+ * external properties not added to the prototype.
372
+ * @callback
373
+ * @param jsc_class a #JSCClass
374
+ * @param context a #JSCContext
375
+ * @param instance the `jsc_class` instance
376
+ * @returns a %NULL-terminated array of strings containing the property names, or %NULL if @instance doesn't have enumerable properties.
377
+ */
378
+ interface ClassEnumeratePropertiesFunction {
379
+ (jsc_class: Class, context: Context, instance: any | null): string[] | null
380
+ }
381
+ /**
382
+ * The type of get_property in #JSCClassVTable. This is only required when you need to handle
383
+ * external properties not added to the prototype.
384
+ * @callback
385
+ * @param jsc_class a #JSCClass
386
+ * @param context a #JSCContext
387
+ * @param instance the `jsc_class` instance
388
+ * @param name the property name
389
+ * @returns a #JSCValue or %NULL to forward the request to the parent class or prototype chain
390
+ */
391
+ interface ClassGetPropertyFunction {
392
+ (jsc_class: Class, context: Context, instance: any | null, name: string | null): Value | null
393
+ }
394
+ /**
395
+ * The type of has_property in #JSCClassVTable. This is only required when you need to handle
396
+ * external properties not added to the prototype.
397
+ * @callback
398
+ * @param jsc_class a #JSCClass
399
+ * @param context a #JSCContext
400
+ * @param instance the `jsc_class` instance
401
+ * @param name the property name
402
+ * @returns %TRUE if @instance has a property with @name or %FALSE to forward the request to the parent class or prototype chain.
403
+ */
404
+ interface ClassHasPropertyFunction {
405
+ (jsc_class: Class, context: Context, instance: any | null, name: string | null): boolean
406
+ }
407
+ /**
408
+ * The type of set_property in #JSCClassVTable. This is only required when you need to handle
409
+ * external properties not added to the prototype.
410
+ * @callback
411
+ * @param jsc_class a #JSCClass
412
+ * @param context a #JSCContext
413
+ * @param instance the `jsc_class` instance
414
+ * @param name the property name
415
+ * @param value the #JSCValue to set
416
+ * @returns %TRUE if handled or %FALSE to forward the request to the parent class or prototype chain.
417
+ */
418
+ interface ClassSetPropertyFunction {
419
+ (jsc_class: Class, context: Context, instance: any | null, name: string | null, value: Value): boolean
420
+ }
421
+ /**
422
+ * Function used to handle JavaScript exceptions in a #JSCContext.
423
+ * @callback
424
+ * @param context a #JSCContext
425
+ * @param exception a #JSCException
426
+ */
427
+ interface ExceptionHandler {
428
+ (context: Context, exception: Exception): void
429
+ }
430
+ /**
431
+ * Function used to iterate options.
432
+ *
433
+ * Not that `description` string is not localized.
434
+ * @callback
435
+ * @param option the option name
436
+ * @param type the option #JSCOptionType
437
+ * @param description the option description, or %NULL
438
+ * @returns %TRUE to stop the iteration, or %FALSE otherwise
439
+ */
440
+ interface OptionsFunc {
441
+ (option: string | null, type: OptionType, description: string | null): boolean
442
+ }
443
+ module Class {
444
+
445
+ // Constructor properties interface
446
+
447
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
448
+
449
+ // Own constructor properties of JavaScriptCore-6.0.JavaScriptCore.Class
450
+
451
+ /**
452
+ * The #JSCContext in which the class was registered.
453
+ */
454
+ context?: Context | null
455
+ /**
456
+ * The name of the class.
457
+ */
458
+ name?: string | null
459
+ /**
460
+ * The parent class or %NULL in case of final classes.
461
+ */
462
+ parent?: Class | null
463
+ }
464
+
465
+ }
466
+
467
+ interface Class {
468
+
469
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.Class
470
+
471
+ /**
472
+ * The #JSCContext in which the class was registered.
473
+ */
474
+ readonly context: Context
475
+ /**
476
+ * The name of the class.
477
+ */
478
+ readonly name: string | null
479
+ /**
480
+ * The parent class or %NULL in case of final classes.
481
+ */
482
+ readonly parent: Class
483
+
484
+ // Owm methods of JavaScriptCore-6.0.JavaScriptCore.Class
485
+
486
+ /**
487
+ * Add a constructor to `jsc_class`. If `name` is %NULL, the class name will be used. When <function>new</function>
488
+ * is used with the constructor or jsc_value_constructor_call() is called, `callback` is invoked receiving
489
+ * a #GPtrArray of #JSCValue<!-- -->s as arguments and `user_data` as the last parameter. When the constructor object
490
+ * is cleared in the #JSCClass context, `destroy_notify` is called with `user_data` as parameter.
491
+ *
492
+ * This function creates the constructor, which needs to be added to an object as a property to be able to use it. Use
493
+ * jsc_context_set_value() to make the constructor available in the global object.
494
+ *
495
+ * Note that the value returned by `callback` is adopted by `jsc_class,` and the #GDestroyNotify passed to
496
+ * jsc_context_register_class() is responsible for disposing of it.
497
+ * @param name the constructor name or %NULL
498
+ * @param callback a #GCallback to be called to create an instance of `jsc_class`
499
+ * @param return_type the #GType of the constructor return value
500
+ * @returns a #JSCValue representing the class constructor.
501
+ */
502
+ add_constructor_variadic(name: string | null, callback: GObject.Callback, return_type: GObject.GType): Value
503
+ /**
504
+ * Add a constructor to `jsc_class`. If `name` is %NULL, the class name will be used. When <function>new</function>
505
+ * is used with the constructor or jsc_value_constructor_call() is called, `callback` is invoked receiving the
506
+ * parameters and `user_data` as the last parameter. When the constructor object is cleared in the #JSCClass context,
507
+ * `destroy_notify` is called with `user_data` as parameter.
508
+ *
509
+ * This function creates the constructor, which needs to be added to an object as a property to be able to use it. Use
510
+ * jsc_context_set_value() to make the constructor available in the global object.
511
+ *
512
+ * Note that the value returned by `callback` is adopted by `jsc_class,` and the #GDestroyNotify passed to
513
+ * jsc_context_register_class() is responsible for disposing of it.
514
+ * @param name the constructor name or %NULL
515
+ * @param callback a #GCallback to be called to create an instance of `jsc_class`
516
+ * @param return_type the #GType of the constructor return value
517
+ * @param parameter_types a list of #GType<!-- -->s, one for each parameter, or %NULL
518
+ * @returns a #JSCValue representing the class constructor.
519
+ */
520
+ add_constructor(name: string | null, callback: GObject.Callback, return_type: GObject.GType, parameter_types: GObject.GType[] | null): Value
521
+ /**
522
+ * Add method with `name` to `jsc_class`. When the method is called by JavaScript or jsc_value_object_invoke_method(),
523
+ * `callback` is called receiving the class instance as first parameter, followed by a #GPtrArray of #JSCValue<!-- -->s
524
+ * with the method arguments and then `user_data` as last parameter. When the method is cleared in the #JSCClass context,
525
+ * `destroy_notify` is called with `user_data` as parameter.
526
+ *
527
+ * Note that the value returned by `callback` must be transfer full. In case of non-refcounted boxed types, you should use
528
+ * %G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used.
529
+ * If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created
530
+ * with jsc_value_new_object() that receives the copy as the instance parameter.
531
+ * @param name the method name
532
+ * @param callback a #GCallback to be called to invoke method `name` of `jsc_class`
533
+ * @param return_type the #GType of the method return value, or %G_TYPE_NONE if the method is void.
534
+ */
535
+ add_method_variadic(name: string | null, callback: GObject.Callback, return_type: GObject.GType): void
536
+ /**
537
+ * Add method with `name` to `jsc_class`. When the method is called by JavaScript or jsc_value_object_invoke_method(),
538
+ * `callback` is called receiving the class instance as first parameter, followed by the method parameters and then
539
+ * `user_data` as last parameter. When the method is cleared in the #JSCClass context, `destroy_notify` is called with
540
+ * `user_data` as parameter.
541
+ *
542
+ * Note that the value returned by `callback` must be transfer full. In case of non-refcounted boxed types, you should use
543
+ * %G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used.
544
+ * If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created
545
+ * with jsc_value_new_object() that receives the copy as the instance parameter.
546
+ * @param name the method name
547
+ * @param callback a #GCallback to be called to invoke method `name` of `jsc_class`
548
+ * @param return_type the #GType of the method return value, or %G_TYPE_NONE if the method is void.
549
+ * @param parameter_types a list of #GType<!-- -->s, one for each parameter, or %NULL
550
+ */
551
+ add_method(name: string | null, callback: GObject.Callback, return_type: GObject.GType, parameter_types: GObject.GType[] | null): void
552
+ /**
553
+ * Add a property with `name` to `jsc_class`. When the property value needs to be getted, `getter` is called
554
+ * receiving the the class instance as first parameter and `user_data` as last parameter. When the property
555
+ * value needs to be set, `setter` is called receiving the the class instance as first parameter, followed
556
+ * by the value to be set and then `user_data` as the last parameter. When the property is cleared in the
557
+ * #JSCClass context, `destroy_notify` is called with `user_data` as parameter.
558
+ *
559
+ * Note that the value returned by `getter` must be transfer full. In case of non-refcounted boxed types, you should use
560
+ * %G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used.
561
+ * If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created
562
+ * with jsc_value_new_object() that receives the copy as the instance parameter.
563
+ * @param name the property name
564
+ * @param property_type the #GType of the property value
565
+ * @param getter a #GCallback to be called to get the property value
566
+ * @param setter a #GCallback to be called to set the property value
567
+ */
568
+ add_property(name: string | null, property_type: GObject.GType, getter: GObject.Callback | null, setter: GObject.Callback | null): void
569
+ /**
570
+ * Get the class name of `jsc_class`
571
+ * @returns the name of @jsc_class
572
+ */
573
+ get_name(): string | null
574
+ /**
575
+ * Get the parent class of `jsc_class`
576
+ * @returns the parent class of @jsc_class
577
+ */
578
+ get_parent(): Class
579
+
580
+ // Class property signals of JavaScriptCore-6.0.JavaScriptCore.Class
581
+
582
+ connect(sigName: "notify::context", callback: (($obj: Class, pspec: GObject.ParamSpec) => void)): number
583
+ connect_after(sigName: "notify::context", callback: (($obj: Class, pspec: GObject.ParamSpec) => void)): number
584
+ emit(sigName: "notify::context", ...args: any[]): void
585
+ connect(sigName: "notify::name", callback: (($obj: Class, pspec: GObject.ParamSpec) => void)): number
586
+ connect_after(sigName: "notify::name", callback: (($obj: Class, pspec: GObject.ParamSpec) => void)): number
587
+ emit(sigName: "notify::name", ...args: any[]): void
588
+ connect(sigName: "notify::parent", callback: (($obj: Class, pspec: GObject.ParamSpec) => void)): number
589
+ connect_after(sigName: "notify::parent", callback: (($obj: Class, pspec: GObject.ParamSpec) => void)): number
590
+ emit(sigName: "notify::parent", ...args: any[]): void
591
+ connect(sigName: string, callback: (...args: any[]) => void): number
592
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
593
+ emit(sigName: string, ...args: any[]): void
594
+ disconnect(id: number): void
595
+ }
596
+
597
+ /**
598
+ * A JSSClass represents a custom JavaScript class registered by the user in a #JSCContext.
599
+ * It allows to create new JavaScripts objects whose instances are created by the user using
600
+ * this API.
601
+ * It's possible to add constructors, properties and methods for a JSSClass by providing
602
+ * #GCallback<!-- -->s to implement them.
603
+ * @class
604
+ */
605
+ class Class extends GObject.Object {
606
+
607
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.Class
608
+
609
+ static name: string
610
+ static $gtype: GObject.GType<Class>
611
+
612
+ // Constructors of JavaScriptCore-6.0.JavaScriptCore.Class
613
+
614
+ constructor(config?: Class.ConstructorProperties)
615
+ _init(config?: Class.ConstructorProperties): void
616
+ }
617
+
618
+ module Context {
619
+
620
+ // Constructor properties interface
621
+
622
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
623
+
624
+ // Own constructor properties of JavaScriptCore-6.0.JavaScriptCore.Context
625
+
626
+ /**
627
+ * The #JSCVirtualMachine in which the context was created.
628
+ */
629
+ virtual_machine?: VirtualMachine | null
630
+ }
631
+
632
+ }
633
+
634
+ interface Context {
635
+
636
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.Context
637
+
638
+ /**
639
+ * The #JSCVirtualMachine in which the context was created.
640
+ */
641
+ readonly virtual_machine: VirtualMachine
642
+
643
+ // Owm methods of JavaScriptCore-6.0.JavaScriptCore.Context
644
+
645
+ /**
646
+ * Check the given `code` in `context` for syntax errors. The `line_number` is the starting line number in `uri;`
647
+ * the value is one-based so the first line is 1. `uri` and `line_number` are only used to fill the `exception`.
648
+ * In case of errors `exception` will be set to a new #JSCException with the details. You can pass %NULL to
649
+ * `exception` to ignore the error details.
650
+ * @param code a JavaScript script to check
651
+ * @param length length of `code,` or -1 if `code` is a nul-terminated string
652
+ * @param mode a #JSCCheckSyntaxMode
653
+ * @param uri the source URI
654
+ * @param line_number the starting line number
655
+ * @returns a #JSCCheckSyntaxResult
656
+ */
657
+ check_syntax(code: string | null, length: number, mode: CheckSyntaxMode, uri: string | null, line_number: number): [ /* returnType */ CheckSyntaxResult, /* exception */ Exception ]
658
+ /**
659
+ * Clear the uncaught exception in `context` if any.
660
+ */
661
+ clear_exception(): void
662
+ /**
663
+ * Evaluate `code` in `context`.
664
+ * @param code a JavaScript script to evaluate
665
+ * @param length length of `code,` or -1 if `code` is a nul-terminated string
666
+ * @returns a #JSCValue representing the last value generated by the script.
667
+ */
668
+ evaluate(code: string | null, length: number): Value
669
+ /**
670
+ * Evaluate `code` and create an new object where symbols defined in `code` will be added as properties,
671
+ * instead of being added to `context` global object. The new object is returned as `object` parameter.
672
+ * Similar to how jsc_value_new_object() works, if `object_instance` is not %NULL `object_class` must be provided too.
673
+ * The `line_number` is the starting line number in `uri;` the value is one-based so the first line is 1.
674
+ * `uri` and `line_number` will be shown in exceptions and they don't affect the behavior of the script.
675
+ * @param code a JavaScript script to evaluate
676
+ * @param length length of `code,` or -1 if `code` is a nul-terminated string
677
+ * @param object_instance an object instance
678
+ * @param object_class a #JSCClass or %NULL to use the default
679
+ * @param uri the source URI
680
+ * @param line_number the starting line number
681
+ * @returns a #JSCValue representing the last value generated by the script.
682
+ */
683
+ evaluate_in_object(code: string | null, length: number, object_instance: any | null, object_class: Class | null, uri: string | null, line_number: number): [ /* returnType */ Value, /* object */ Value ]
684
+ /**
685
+ * Evaluate `code` in `context` using `uri` as the source URI. The `line_number` is the starting line number
686
+ * in `uri;` the value is one-based so the first line is 1. `uri` and `line_number` will be shown in exceptions and
687
+ * they don't affect the behavior of the script.
688
+ * @param code a JavaScript script to evaluate
689
+ * @param length length of `code,` or -1 if `code` is a nul-terminated string
690
+ * @param uri the source URI
691
+ * @param line_number the starting line number
692
+ * @returns a #JSCValue representing the last value generated by the script.
693
+ */
694
+ evaluate_with_source_uri(code: string | null, length: number, uri: string | null, line_number: number): Value
695
+ /**
696
+ * Get the last unhandled exception thrown in `context` by API functions calls.
697
+ * @returns a #JSCException or %NULL if there isn't any unhandled exception in the #JSCContext.
698
+ */
699
+ get_exception(): Exception | null
700
+ /**
701
+ * Get a #JSCValue referencing the `context` global object
702
+ * @returns a #JSCValue
703
+ */
704
+ get_global_object(): Value
705
+ /**
706
+ * Get a property of `context` global object with `name`.
707
+ * @param name the value name
708
+ * @returns a #JSCValue
709
+ */
710
+ get_value(name: string | null): Value
711
+ /**
712
+ * Get the #JSCVirtualMachine where `context` was created.
713
+ * @returns the #JSCVirtualMachine where the #JSCContext was created.
714
+ */
715
+ get_virtual_machine(): VirtualMachine
716
+ /**
717
+ * Remove the last #JSCExceptionHandler previously pushed to `context` with
718
+ * jsc_context_push_exception_handler().
719
+ */
720
+ pop_exception_handler(): void
721
+ /**
722
+ * Push an exception handler in `context`. Whenever a JavaScript exception happens in
723
+ * the #JSCContext, the given `handler` will be called. The default #JSCExceptionHandler
724
+ * simply calls jsc_context_throw_exception() to throw the exception to the #JSCContext.
725
+ * If you don't want to catch the exception, but only get notified about it, call
726
+ * jsc_context_throw_exception() in `handler` like the default one does.
727
+ * The last exception handler pushed is the only one used by the #JSCContext, use
728
+ * jsc_context_pop_exception_handler() to remove it and set the previous one. When `handler`
729
+ * is removed from the context, `destroy_notify` i called with `user_data` as parameter.
730
+ * @param handler a #JSCExceptionHandler
731
+ */
732
+ push_exception_handler(handler: ExceptionHandler): void
733
+ /**
734
+ * Register a custom class in `context` using the given `name`. If the new class inherits from
735
+ * another #JSCClass, the parent should be passed as `parent_class,` otherwise %NULL should be
736
+ * used. The optional `vtable` parameter allows to provide a custom implementation for handling
737
+ * the class, for example, to handle external properties not added to the prototype.
738
+ * When an instance of the #JSCClass is cleared in the context, `destroy_notify` is called with
739
+ * the instance as parameter.
740
+ * @param name the class name
741
+ * @param parent_class a #JSCClass or %NULL
742
+ * @param vtable an optional #JSCClassVTable or %NULL
743
+ * @param destroy_notify a destroy notifier for class instances
744
+ * @returns a #JSCClass
745
+ */
746
+ register_class(name: string | null, parent_class: Class | null, vtable: ClassVTable | null, destroy_notify: GLib.DestroyNotify | null): Class
747
+ /**
748
+ * Set a property of `context` global object with `name` and `value`.
749
+ * @param name the value name
750
+ * @param value a #JSCValue
751
+ */
752
+ set_value(name: string | null, value: Value): void
753
+ /**
754
+ * Throw an exception to `context` using the given error message. The created #JSCException
755
+ * can be retrieved with jsc_context_get_exception().
756
+ * @param error_message an error message
757
+ */
758
+ throw(error_message: string | null): void
759
+ /**
760
+ * Throw `exception` to `context`.
761
+ * @param exception a #JSCException
762
+ */
763
+ throw_exception(exception: Exception): void
764
+ /**
765
+ * Throw an exception to `context` using the given error name and message. The created #JSCException
766
+ * can be retrieved with jsc_context_get_exception().
767
+ * @param error_name the error name
768
+ * @param error_message an error message
769
+ */
770
+ throw_with_name(error_name: string | null, error_message: string | null): void
771
+
772
+ // Class property signals of JavaScriptCore-6.0.JavaScriptCore.Context
773
+
774
+ connect(sigName: "notify::virtual-machine", callback: (($obj: Context, pspec: GObject.ParamSpec) => void)): number
775
+ connect_after(sigName: "notify::virtual-machine", callback: (($obj: Context, pspec: GObject.ParamSpec) => void)): number
776
+ emit(sigName: "notify::virtual-machine", ...args: any[]): void
777
+ connect(sigName: string, callback: (...args: any[]) => void): number
778
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
779
+ emit(sigName: string, ...args: any[]): void
780
+ disconnect(id: number): void
781
+ }
782
+
783
+ /**
784
+ * JSCContext represents a JavaScript execution context, where all operations
785
+ * take place and where the values will be associated.
786
+ *
787
+ * When a new context is created, a global object is allocated and the built-in JavaScript
788
+ * objects (Object, Function, String, Array) are populated. You can execute JavaScript in
789
+ * the context by using jsc_context_evaluate() or jsc_context_evaluate_with_source_uri().
790
+ * It's also possible to register custom objects in the context with jsc_context_register_class().
791
+ * @class
792
+ */
793
+ class Context extends GObject.Object {
794
+
795
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.Context
796
+
797
+ static name: string
798
+ static $gtype: GObject.GType<Context>
799
+
800
+ // Constructors of JavaScriptCore-6.0.JavaScriptCore.Context
801
+
802
+ constructor(config?: Context.ConstructorProperties)
803
+ /**
804
+ * Create a new #JSCContext. The context is created in a new #JSCVirtualMachine.
805
+ * Use jsc_context_new_with_virtual_machine() to create a new #JSCContext in an
806
+ * existing #JSCVirtualMachine.
807
+ * @constructor
808
+ * @returns the newly created #JSCContext.
809
+ */
810
+ constructor()
811
+ /**
812
+ * Create a new #JSCContext. The context is created in a new #JSCVirtualMachine.
813
+ * Use jsc_context_new_with_virtual_machine() to create a new #JSCContext in an
814
+ * existing #JSCVirtualMachine.
815
+ * @constructor
816
+ * @returns the newly created #JSCContext.
817
+ */
818
+ static new(): Context
819
+ /**
820
+ * Create a new #JSCContext in `virtual_machine`.
821
+ * @constructor
822
+ * @param vm a #JSCVirtualMachine
823
+ * @returns the newly created #JSCContext.
824
+ */
825
+ static new_with_virtual_machine(vm: VirtualMachine): Context
826
+ _init(config?: Context.ConstructorProperties): void
827
+ /**
828
+ * Get the #JSCContext that is currently executing a function. This should only be
829
+ * called within a function or method callback, otherwise %NULL will be returned.
830
+ * @returns the #JSCContext that is currently executing.
831
+ */
832
+ static get_current(): Context | null
833
+ }
834
+
835
+ module Exception {
836
+
837
+ // Constructor properties interface
838
+
839
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
840
+ }
841
+
842
+ }
843
+
844
+ interface Exception {
845
+
846
+ // Owm methods of JavaScriptCore-6.0.JavaScriptCore.Exception
847
+
848
+ /**
849
+ * Get a string with the exception backtrace.
850
+ * @returns the exception backtrace string or %NULL.
851
+ */
852
+ get_backtrace_string(): string | null
853
+ /**
854
+ * Get the column number at which `exception` happened.
855
+ * @returns the column number of @exception.
856
+ */
857
+ get_column_number(): number
858
+ /**
859
+ * Get the line number at which `exception` happened.
860
+ * @returns the line number of @exception.
861
+ */
862
+ get_line_number(): number
863
+ /**
864
+ * Get the error message of `exception`.
865
+ * @returns the @exception error message.
866
+ */
867
+ get_message(): string | null
868
+ /**
869
+ * Get the error name of `exception`
870
+ * @returns the @exception error name.
871
+ */
872
+ get_name(): string | null
873
+ /**
874
+ * Get the source URI of `exception`.
875
+ * @returns the the source URI of @exception, or %NULL.
876
+ */
877
+ get_source_uri(): string | null
878
+ /**
879
+ * Return a report message of `exception,` containing all the possible details such us
880
+ * source URI, line, column and backtrace, and formatted to be printed.
881
+ * @returns a new string with the exception report
882
+ */
883
+ report(): string | null
884
+ /**
885
+ * Get the string representation of `exception` error.
886
+ * @returns the string representation of @exception.
887
+ */
888
+ to_string(): string | null
889
+
890
+ // Class property signals of JavaScriptCore-6.0.JavaScriptCore.Exception
891
+
892
+ connect(sigName: string, callback: (...args: any[]) => void): number
893
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
894
+ emit(sigName: string, ...args: any[]): void
895
+ disconnect(id: number): void
896
+ }
897
+
898
+ /**
899
+ * JSCException represents a JavaScript exception.
900
+ * @class
901
+ */
902
+ class Exception extends GObject.Object {
903
+
904
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.Exception
905
+
906
+ static name: string
907
+ static $gtype: GObject.GType<Exception>
908
+
909
+ // Constructors of JavaScriptCore-6.0.JavaScriptCore.Exception
910
+
911
+ constructor(config?: Exception.ConstructorProperties)
912
+ /**
913
+ * Create a new #JSCException in `context` with `message`.
914
+ * @constructor
915
+ * @param context a #JSCContext
916
+ * @param message the error message
917
+ * @returns a new #JSCException.
918
+ */
919
+ constructor(context: Context, message: string | null)
920
+ /**
921
+ * Create a new #JSCException in `context` with `message`.
922
+ * @constructor
923
+ * @param context a #JSCContext
924
+ * @param message the error message
925
+ * @returns a new #JSCException.
926
+ */
927
+ static new(context: Context, message: string | null): Exception
928
+ /**
929
+ * Create a new #JSCException in `context` with `name` and `message`.
930
+ * @constructor
931
+ * @param context a #JSCContext
932
+ * @param name the error name
933
+ * @param message the error message
934
+ * @returns a new #JSCException.
935
+ */
936
+ static new_with_name(context: Context, name: string | null, message: string | null): Exception
937
+ _init(config?: Exception.ConstructorProperties): void
938
+ }
939
+
940
+ module Value {
941
+
942
+ // Constructor properties interface
943
+
944
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
945
+
946
+ // Own constructor properties of JavaScriptCore-6.0.JavaScriptCore.Value
947
+
948
+ /**
949
+ * The #JSCContext in which the value was created.
950
+ */
951
+ context?: Context | null
952
+ }
953
+
954
+ }
955
+
956
+ interface Value {
957
+
958
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.Value
959
+
960
+ /**
961
+ * The #JSCContext in which the value was created.
962
+ */
963
+ readonly context: Context
964
+
965
+ // Owm methods of JavaScriptCore-6.0.JavaScriptCore.Value
966
+
967
+ /**
968
+ * Gets a pointer to memory that contains the array buffer data.
969
+ *
970
+ * Obtains a pointer to the memory region that holds the contents of the
971
+ * %ArrayBuffer; modifications done to the data will be visible to JavaScript
972
+ * code. If `size` is not %NULL, the size in bytes of the memory region
973
+ * will also be stored in the pointed location.
974
+ *
975
+ * Note that the pointer returned by this function is not guaranteed to remain
976
+ * the same after calls to other JSC API functions. If you plan to access the
977
+ * data of the %ArrayBuffer later, you can keep a reference to the `value` and
978
+ * obtain the data pointer at a later point. Keep in mind that if JavaScript
979
+ * code has a chance to run, for example due to main loop events that result
980
+ * in JSC being called, the contents of the memory region might be modified in
981
+ * the meantime. Consider taking a copy of the data and using the copy instead
982
+ * in asynchronous code.
983
+ * @param size location where to store the size of the memory region.
984
+ * @returns pointer to memory.
985
+ */
986
+ array_buffer_get_data(size: number | null): any | null
987
+ /**
988
+ * Gets the size in bytes of the array buffer.
989
+ *
990
+ * Obtains the size in bytes of the memory region that holds the contents of
991
+ * an %ArrayBuffer.
992
+ * @returns size, in bytes.
993
+ */
994
+ array_buffer_get_size(): number
995
+ /**
996
+ * Invoke <function>new</function> with constructor referenced by `value`. If `n_parameters`
997
+ * is 0 no parameters will be passed to the constructor.
998
+ * @param parameters the #JSCValue<!-- -->s to pass as parameters to the constructor, or %NULL
999
+ * @returns a #JSCValue referencing the newly created object instance.
1000
+ */
1001
+ constructor_call(parameters: Value[] | null): Value
1002
+ /**
1003
+ * Call function referenced by `value,` passing the given `parameters`. If `n_parameters`
1004
+ * is 0 no parameters will be passed to the function.
1005
+ *
1006
+ * This function always returns a #JSCValue, in case of void functions a #JSCValue referencing
1007
+ * <function>undefined</function> is returned
1008
+ * @param parameters the #JSCValue<!-- -->s to pass as parameters to the function, or %NULL
1009
+ * @returns a #JSCValue with the return value of the function.
1010
+ */
1011
+ function_call(parameters: Value[] | null): Value
1012
+ /**
1013
+ * Get the #JSCContext in which `value` was created.
1014
+ * @returns the #JSCValue context.
1015
+ */
1016
+ get_context(): Context
1017
+ /**
1018
+ * Get whether the value referenced by `value` is an array.
1019
+ * @returns whether the value is an array.
1020
+ */
1021
+ is_array(): boolean
1022
+ /**
1023
+ * Check whether the `value` is an %ArrayBuffer.
1024
+ * @returns whether the value is an %ArrayBuffer
1025
+ */
1026
+ is_array_buffer(): boolean
1027
+ /**
1028
+ * Get whether the value referenced by `value` is a boolean.
1029
+ * @returns whether the value is a boolean.
1030
+ */
1031
+ is_boolean(): boolean
1032
+ /**
1033
+ * Get whether the value referenced by `value` is a constructor.
1034
+ * @returns whether the value is a constructor.
1035
+ */
1036
+ is_constructor(): boolean
1037
+ /**
1038
+ * Get whether the value referenced by `value` is a function
1039
+ * @returns whether the value is a function.
1040
+ */
1041
+ is_function(): boolean
1042
+ /**
1043
+ * Get whether the value referenced by `value` is <function>null</function>.
1044
+ * @returns whether the value is null.
1045
+ */
1046
+ is_null(): boolean
1047
+ /**
1048
+ * Get whether the value referenced by `value` is a number.
1049
+ * @returns whether the value is a number.
1050
+ */
1051
+ is_number(): boolean
1052
+ /**
1053
+ * Get whether the value referenced by `value` is an object.
1054
+ * @returns whether the value is an object.
1055
+ */
1056
+ is_object(): boolean
1057
+ /**
1058
+ * Get whether the value referenced by `value` is a string
1059
+ * @returns whether the value is a string
1060
+ */
1061
+ is_string(): boolean
1062
+ /**
1063
+ * Determines whether a value is a typed array.
1064
+ * @returns Whether @value is a typed array.
1065
+ */
1066
+ is_typed_array(): boolean
1067
+ /**
1068
+ * Get whether the value referenced by `value` is <function>undefined</function>.
1069
+ * @returns whether the value is undefined.
1070
+ */
1071
+ is_undefined(): boolean
1072
+ /**
1073
+ * Create a new typed array value with elements from an array buffer.
1074
+ *
1075
+ * Create a #JSCValue referencing a new typed array value containing
1076
+ * elements of the given `type,` where the elements are stored at the memory
1077
+ * region represented by the `array_buffer`.
1078
+ *
1079
+ * The `type` must *not* be %JSC_TYPED_ARRAY_NONE.
1080
+ *
1081
+ * The `offset` and `length` parameters can be used to indicate which part of
1082
+ * the array buffer can be accessed through the typed array. If both are
1083
+ * omitted (passing zero as `offset,` and `-1` as `length)`, the whole
1084
+ * `array_buffer` is exposed through the typed array. Omitting the `length`
1085
+ * with a non-zero `offset` will expose the remainder of the `array_buffer`
1086
+ * starting at the indicated offset.
1087
+ * @param type type of array elements.
1088
+ * @param offset offset, in bytes.
1089
+ * @param length number of array elements, or `-1`.
1090
+ * @returns a #JSCValue
1091
+ */
1092
+ new_typed_array_with_buffer(type: TypedArrayType, offset: number, length: number): Value
1093
+ /**
1094
+ * Define or modify a property with `property_name` in object referenced by `value`. When the
1095
+ * property value needs to be getted or set, `getter` and `setter` callbacks will be called.
1096
+ * When the property is cleared in the #JSCClass context, `destroy_notify` is called with
1097
+ * `user_data` as parameter. This is equivalent to JavaScript <function>Object.defineProperty()</function>
1098
+ * when used with an accessor descriptor.
1099
+ *
1100
+ * Note that the value returned by `getter` must be fully transferred. In case of boxed types, you could use
1101
+ * %G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used.
1102
+ * If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created
1103
+ * with jsc_value_new_object() that receives the copy as instance parameter.
1104
+ *
1105
+ * Note that `getter` and `setter` are called as functions and not methods, so they don't receive an instance as
1106
+ * first parameter. Use jsc_class_add_property() if you want to add property accessor invoked as a method.
1107
+ * @param property_name the name of the property to define
1108
+ * @param flags #JSCValuePropertyFlags
1109
+ * @param property_type the #GType of the property
1110
+ * @param getter a #GCallback to be called to get the property value
1111
+ * @param setter a #GCallback to be called to set the property value
1112
+ */
1113
+ object_define_property_accessor(property_name: string | null, flags: ValuePropertyFlags, property_type: GObject.GType, getter: GObject.Callback | null, setter: GObject.Callback | null): void
1114
+ /**
1115
+ * Define or modify a property with `property_name` in object referenced by `value`. This is equivalent to
1116
+ * JavaScript <function>Object.defineProperty()</function> when used with a data descriptor.
1117
+ * @param property_name the name of the property to define
1118
+ * @param flags #JSCValuePropertyFlags
1119
+ * @param property_value the default property value
1120
+ */
1121
+ object_define_property_data(property_name: string | null, flags: ValuePropertyFlags, property_value: Value | null): void
1122
+ /**
1123
+ * Try to delete property with `name` from `value`. This function will return %FALSE if
1124
+ * the property was defined without %JSC_VALUE_PROPERTY_CONFIGURABLE flag.
1125
+ * @param name the property name
1126
+ * @returns %TRUE if the property was deleted, or %FALSE otherwise.
1127
+ */
1128
+ object_delete_property(name: string | null): boolean
1129
+ /**
1130
+ * Get the list of property names of `value`. Only properties defined with %JSC_VALUE_PROPERTY_ENUMERABLE
1131
+ * flag will be collected.
1132
+ * @returns a %NULL-terminated array of strings containing the property names, or %NULL if @value doesn't have enumerable properties. Use g_strfreev() to free.
1133
+ */
1134
+ object_enumerate_properties(): string[] | null
1135
+ /**
1136
+ * Get property with `name` from `value`.
1137
+ * @param name the property name
1138
+ * @returns the property #JSCValue.
1139
+ */
1140
+ object_get_property(name: string | null): Value
1141
+ /**
1142
+ * Get property at `index` from `value`.
1143
+ * @param index the property index
1144
+ * @returns the property #JSCValue.
1145
+ */
1146
+ object_get_property_at_index(index: number): Value
1147
+ /**
1148
+ * Get whether `value` has property with `name`.
1149
+ * @param name the property name
1150
+ * @returns %TRUE if @value has a property with @name, or %FALSE otherwise
1151
+ */
1152
+ object_has_property(name: string | null): boolean
1153
+ /**
1154
+ * Invoke method with `name` on object referenced by `value,` passing the given `parameters`. If
1155
+ * `n_parameters` is 0 no parameters will be passed to the method.
1156
+ * The object instance will be handled automatically even when the method is a custom one
1157
+ * registered with jsc_class_add_method(), so it should never be passed explicitly as parameter
1158
+ * of this function.
1159
+ *
1160
+ * This function always returns a #JSCValue, in case of void methods a #JSCValue referencing
1161
+ * <function>undefined</function> is returned.
1162
+ * @param name the method name
1163
+ * @param parameters the #JSCValue<!-- -->s to pass as parameters to the method, or %NULL
1164
+ * @returns a #JSCValue with the return value of the method.
1165
+ */
1166
+ object_invoke_method(name: string | null, parameters: Value[] | null): Value
1167
+ /**
1168
+ * Get whether the value referenced by `value` is an instance of class `name`.
1169
+ * @param name a class name
1170
+ * @returns whether the value is an object instance of class @name.
1171
+ */
1172
+ object_is_instance_of(name: string | null): boolean
1173
+ /**
1174
+ * Set `property` with `name` on `value`.
1175
+ * @param name the property name
1176
+ * @param property the #JSCValue to set
1177
+ */
1178
+ object_set_property(name: string | null, property: Value): void
1179
+ /**
1180
+ * Set `property` at `index` on `value`.
1181
+ * @param index the property index
1182
+ * @param property the #JSCValue to set
1183
+ */
1184
+ object_set_property_at_index(index: number, property: Value): void
1185
+ /**
1186
+ * Convert `value` to a boolean.
1187
+ * @returns a #gboolean result of the conversion.
1188
+ */
1189
+ to_boolean(): boolean
1190
+ /**
1191
+ * Convert `value` to a double.
1192
+ * @returns a #gdouble result of the conversion.
1193
+ */
1194
+ to_double(): number
1195
+ /**
1196
+ * Convert `value` to a #gint32.
1197
+ * @returns a #gint32 result of the conversion.
1198
+ */
1199
+ to_int32(): number
1200
+ /**
1201
+ * Create a JSON string of `value` serialization. If `indent` is 0, the resulting JSON will
1202
+ * not contain newlines. The size of the indent is clamped to 10 spaces.
1203
+ * @param indent The number of spaces to indent when nesting.
1204
+ * @returns a null-terminated JSON string with serialization of @value
1205
+ */
1206
+ to_json(indent: number): string | null
1207
+ /**
1208
+ * Convert `value` to a string. Use jsc_value_to_string_as_bytes() instead, if you need to
1209
+ * handle strings containing null characters.
1210
+ * @returns a null-terminated string result of the conversion.
1211
+ */
1212
+ to_string(): string | null
1213
+ /**
1214
+ * Convert `value` to a string and return the results as #GBytes. This is needed
1215
+ * to handle strings with null characters.
1216
+ * @returns a #GBytes with the result of the conversion.
1217
+ */
1218
+ to_string_as_bytes(): GLib.Bytes
1219
+ /**
1220
+ * Obtain the %ArrayBuffer for the memory region of the typed array elements.
1221
+ * @returns A #JSCValue
1222
+ */
1223
+ typed_array_get_buffer(): Value
1224
+ /**
1225
+ * Obtains a pointer to the memory region that holds the elements of the typed
1226
+ * array; modifications done to them will be visible to JavaScript code. If
1227
+ * `length` is not %NULL, the number of elements contained in the typed array
1228
+ * are also stored in the pointed location.
1229
+ *
1230
+ * The returned pointer needs to be casted to the appropriate type (see
1231
+ * #JSCTypedArrayType), and has the `offset` over the underlying array
1232
+ * buffer data applied—that is, points to the first element of the typed
1233
+ * array:
1234
+ *
1235
+ *
1236
+ * ```c
1237
+ * if (jsc_value_typed_array_get_type(value) != JSC_TYPED_ARRAY_UINT32)
1238
+ * g_error ("Only arrays of uint32_t are supported");
1239
+ *
1240
+ * gsize count = 0;
1241
+ * uint32_t *elements = jsc_value_typed_array_get_contents (value, &count);
1242
+ * for (gsize i = 0; i < count; i++)
1243
+ * g_print ("index %zu, value %" PRIu32 "\n", i, elements[i]);
1244
+ * ```
1245
+ *
1246
+ *
1247
+ * Note that the pointer returned by this function is not guaranteed to remain
1248
+ * the same after calls to other JSC API functions. See
1249
+ * jsc_value_array_buffer_get_data() for details.
1250
+ * @returns pointer to memory.
1251
+ */
1252
+ typed_array_get_data(): [ /* returnType */ any | null, /* length */ number | null ]
1253
+ /**
1254
+ * Gets the number of elements in a typed array.
1255
+ * @returns number of elements.
1256
+ */
1257
+ typed_array_get_length(): number
1258
+ /**
1259
+ * Gets the offset over the underlying array buffer data.
1260
+ * @returns offset, in bytes.
1261
+ */
1262
+ typed_array_get_offset(): number
1263
+ /**
1264
+ * Gets the size of a typed array.
1265
+ * @returns size, in bytes.
1266
+ */
1267
+ typed_array_get_size(): number
1268
+ /**
1269
+ * Gets the type of elements contained in a typed array.
1270
+ * @returns type of the elements, or %JSC_TYPED_ARRAY_NONE if @value is not a typed array.
1271
+ */
1272
+ typed_array_get_type(): TypedArrayType
1273
+
1274
+ // Class property signals of JavaScriptCore-6.0.JavaScriptCore.Value
1275
+
1276
+ connect(sigName: "notify::context", callback: (($obj: Value, pspec: GObject.ParamSpec) => void)): number
1277
+ connect_after(sigName: "notify::context", callback: (($obj: Value, pspec: GObject.ParamSpec) => void)): number
1278
+ emit(sigName: "notify::context", ...args: any[]): void
1279
+ connect(sigName: string, callback: (...args: any[]) => void): number
1280
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1281
+ emit(sigName: string, ...args: any[]): void
1282
+ disconnect(id: number): void
1283
+ }
1284
+
1285
+ /**
1286
+ * JSCValue represents a reference to a value in a #JSCContext. The JSCValue
1287
+ * protects the referenced value from being garbage collected.
1288
+ * @class
1289
+ */
1290
+ class Value extends GObject.Object {
1291
+
1292
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.Value
1293
+
1294
+ static name: string
1295
+ static $gtype: GObject.GType<Value>
1296
+
1297
+ // Constructors of JavaScriptCore-6.0.JavaScriptCore.Value
1298
+
1299
+ constructor(config?: Value.ConstructorProperties)
1300
+ /**
1301
+ * Creates a new %ArrayBuffer from existing `data` in memory.
1302
+ *
1303
+ * The `data` is not copied: while this allows sharing data with JavaScript
1304
+ * efficiently, the caller must ensure that the memory region remains valid
1305
+ * until the newly created object is released by JSC.
1306
+ *
1307
+ * Optionally, a `destroy_notify` callback can be provided, which will be
1308
+ * invoked with `user_data` as parameter when the %ArrayBuffer object is
1309
+ * released. This is intended to be used for freeing resources related to
1310
+ * the memory region which contains the data:
1311
+ *
1312
+ *
1313
+ * ```!<-- language="C" -->
1314
+ * GMappedFile *f = g_mapped_file_new (file_path, TRUE, NULL);
1315
+ * JSCValue *value = jsc_value_new_array_buffer (context,
1316
+ * g_mapped_file_get_contents (f), g_mapped_file_get_length (f),
1317
+ * (GDestroyNotify) g_mapped_file_unref, f);
1318
+ * ```
1319
+ *
1320
+ *
1321
+ * Note that the `user_data` can be the same value as `data:`
1322
+ *
1323
+ *
1324
+ * ```!<-- language="C" -->
1325
+ * void *bytes = g_malloc0 (100);
1326
+ * JSCValue *value = jsc_value_new_array_buffer (context, bytes, 100, g_free, bytes);
1327
+ * ```
1328
+ *
1329
+ * @constructor
1330
+ * @param context A #JSCContext
1331
+ * @param data Pointer to a region of memory.
1332
+ * @param size Size in bytes of the memory region.
1333
+ * @param destroy_notify destroy notifier for `user_data`.
1334
+ * @param user_data user data.
1335
+ * @returns A #JSCValue, or %NULL in case of exception.
1336
+ */
1337
+ static new_array_buffer(context: Context, data: any | null, size: number, destroy_notify: GLib.DestroyNotify | null, user_data: any | null): Value
1338
+ /**
1339
+ * Create a new #JSCValue referencing an array with the items from `array`. If `array`
1340
+ * is %NULL or empty a new empty array will be created. Elements of `array` should be
1341
+ * pointers to a #JSCValue.
1342
+ * @constructor
1343
+ * @param context a #JSCContext
1344
+ * @param array a #GPtrArray
1345
+ * @returns a #JSCValue.
1346
+ */
1347
+ static new_array_from_garray(context: Context, array: Value[] | null): Value
1348
+ /**
1349
+ * Create a new #JSCValue referencing an array of strings with the items from `strv`. If `array`
1350
+ * is %NULL or empty a new empty array will be created.
1351
+ * @constructor
1352
+ * @param context a #JSCContext
1353
+ * @param strv a %NULL-terminated array of strings
1354
+ * @returns a #JSCValue.
1355
+ */
1356
+ static new_array_from_strv(context: Context, strv: string[]): Value
1357
+ /**
1358
+ * Create a new #JSCValue from `value`
1359
+ * @constructor
1360
+ * @param context a #JSCContext
1361
+ * @param value a #gboolean
1362
+ * @returns a #JSCValue.
1363
+ */
1364
+ static new_boolean(context: Context, value: boolean): Value
1365
+ /**
1366
+ * Create a new #JSCValue referencing a new value created by parsing `json`.
1367
+ * @constructor
1368
+ * @param context a #JSCContext
1369
+ * @param json the JSON string to be parsed
1370
+ * @returns a #JSCValue.
1371
+ */
1372
+ static new_from_json(context: Context, json: string | null): Value
1373
+ /**
1374
+ * Create a function in `context`. If `name` is %NULL an anonymous function will be created.
1375
+ * When the function is called by JavaScript or jsc_value_function_call(), `callback` is called
1376
+ * receiving an #GPtrArray of #JSCValue<!-- -->s with the arguments and then `user_data` as last parameter.
1377
+ * When the function is cleared in `context,` `destroy_notify` is called with `user_data` as parameter.
1378
+ *
1379
+ * Note that the value returned by `callback` must be fully transferred. In case of boxed types, you could use
1380
+ * %G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used.
1381
+ * If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created
1382
+ * with jsc_value_new_object() that receives the copy as instance parameter.
1383
+ * @constructor
1384
+ * @param context a #JSCContext
1385
+ * @param name the function name or %NULL
1386
+ * @param callback a #GCallback.
1387
+ * @param return_type the #GType of the function return value, or %G_TYPE_NONE if the function is void.
1388
+ * @returns a #JSCValue.
1389
+ */
1390
+ static new_function_variadic(context: Context, name: string | null, callback: GObject.Callback, return_type: GObject.GType): Value
1391
+ /**
1392
+ * Create a function in `context`. If `name` is %NULL an anonymous function will be created.
1393
+ * When the function is called by JavaScript or jsc_value_function_call(), `callback` is called
1394
+ * receiving the function parameters and then `user_data` as last parameter. When the function is
1395
+ * cleared in `context,` `destroy_notify` is called with `user_data` as parameter.
1396
+ *
1397
+ * Note that the value returned by `callback` must be fully transferred. In case of boxed types, you could use
1398
+ * %G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used.
1399
+ * If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created
1400
+ * with jsc_value_new_object() that receives the copy as instance parameter.
1401
+ * @constructor
1402
+ * @param context a #JSCContext
1403
+ * @param name the function name or %NULL
1404
+ * @param callback a #GCallback.
1405
+ * @param return_type the #GType of the function return value, or %G_TYPE_NONE if the function is void.
1406
+ * @param parameter_types a list of #GType<!-- -->s, one for each parameter, or %NULL
1407
+ * @returns a #JSCValue.
1408
+ */
1409
+ static new_function(context: Context, name: string | null, callback: GObject.Callback, return_type: GObject.GType, parameter_types: GObject.GType[] | null): Value
1410
+ /**
1411
+ * Create a new #JSCValue referencing <function>null</function> in `context`.
1412
+ * @constructor
1413
+ * @param context a #JSCContext
1414
+ * @returns a #JSCValue.
1415
+ */
1416
+ static new_null(context: Context): Value
1417
+ /**
1418
+ * Create a new #JSCValue from `number`.
1419
+ * @constructor
1420
+ * @param context a #JSCContext
1421
+ * @param number a number
1422
+ * @returns a #JSCValue.
1423
+ */
1424
+ static new_number(context: Context, number: number): Value
1425
+ /**
1426
+ * Create a new #JSCValue from `instance`. If `instance` is %NULL a new empty object is created.
1427
+ * When `instance` is provided, `jsc_class` must be provided too. `jsc_class` takes ownership of
1428
+ * `instance` that will be freed by the #GDestroyNotify passed to jsc_context_register_class().
1429
+ * @constructor
1430
+ * @param context a #JSCContext
1431
+ * @param instance an object instance or %NULL
1432
+ * @param jsc_class the #JSCClass of `instance`
1433
+ * @returns a #JSCValue.
1434
+ */
1435
+ static new_object(context: Context, instance: any | null, jsc_class: Class | null): Value
1436
+ /**
1437
+ * Create a new #JSCValue from `string`. If you need to create a #JSCValue from a
1438
+ * string containing null characters, use jsc_value_new_string_from_bytes() instead.
1439
+ * @constructor
1440
+ * @param context a #JSCContext
1441
+ * @param string a null-terminated string
1442
+ * @returns a #JSCValue.
1443
+ */
1444
+ static new_string(context: Context, string: string | null): Value
1445
+ /**
1446
+ * Create a new #JSCValue from `bytes`.
1447
+ * @constructor
1448
+ * @param context a #JSCContext
1449
+ * @param bytes a #GBytes
1450
+ * @returns a #JSCValue.
1451
+ */
1452
+ static new_string_from_bytes(context: Context, bytes: GLib.Bytes | null): Value
1453
+ /**
1454
+ * Create a new typed array containing a given amount of elements.
1455
+ *
1456
+ * Create a #JSCValue referencing a new typed array with space for `length`
1457
+ * elements of a given `type`. As all typed arrays must have an associated
1458
+ * `ArrayBuffer`, a new one of suitable size will be allocated to store
1459
+ * the elements, which will be initialized to zero.
1460
+ *
1461
+ * The `type` must *not* be %JSC_TYPED_ARRAY_NONE.
1462
+ * @constructor
1463
+ * @param context a #JSCContext
1464
+ * @param type the type of array elements
1465
+ * @param length number of elements in the array
1466
+ * @returns a #JSCValue
1467
+ */
1468
+ static new_typed_array(context: Context, type: TypedArrayType, length: number): Value
1469
+ /**
1470
+ * Create a new #JSCValue referencing <function>undefined</function> in `context`.
1471
+ * @constructor
1472
+ * @param context a #JSCContext
1473
+ * @returns a #JSCValue.
1474
+ */
1475
+ static new_undefined(context: Context): Value
1476
+ _init(config?: Value.ConstructorProperties): void
1477
+ }
1478
+
1479
+ module VirtualMachine {
1480
+
1481
+ // Constructor properties interface
1482
+
1483
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1484
+ }
1485
+
1486
+ }
1487
+
1488
+ interface VirtualMachine {
1489
+
1490
+ // Class property signals of JavaScriptCore-6.0.JavaScriptCore.VirtualMachine
1491
+
1492
+ connect(sigName: string, callback: (...args: any[]) => void): number
1493
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1494
+ emit(sigName: string, ...args: any[]): void
1495
+ disconnect(id: number): void
1496
+ }
1497
+
1498
+ /**
1499
+ * JSCVirtualMachine represents a group of JSCContext<!-- -->s. It allows
1500
+ * concurrent JavaScript execution by creating a different instance of
1501
+ * JSCVirtualMachine in each thread.
1502
+ *
1503
+ * To create a group of JSCContext<!-- -->s pass the same JSCVirtualMachine
1504
+ * instance to every JSCContext constructor.
1505
+ * @class
1506
+ */
1507
+ class VirtualMachine extends GObject.Object {
1508
+
1509
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.VirtualMachine
1510
+
1511
+ static name: string
1512
+ static $gtype: GObject.GType<VirtualMachine>
1513
+
1514
+ // Constructors of JavaScriptCore-6.0.JavaScriptCore.VirtualMachine
1515
+
1516
+ constructor(config?: VirtualMachine.ConstructorProperties)
1517
+ /**
1518
+ * Create a new #JSCVirtualMachine.
1519
+ * @constructor
1520
+ * @returns the newly created #JSCVirtualMachine.
1521
+ */
1522
+ constructor()
1523
+ /**
1524
+ * Create a new #JSCVirtualMachine.
1525
+ * @constructor
1526
+ * @returns the newly created #JSCVirtualMachine.
1527
+ */
1528
+ static new(): VirtualMachine
1529
+ _init(config?: VirtualMachine.ConstructorProperties): void
1530
+ }
1531
+
1532
+ module WeakValue {
1533
+
1534
+ // Signal callback interfaces
1535
+
1536
+ /**
1537
+ * Signal callback interface for `cleared`
1538
+ */
1539
+ interface ClearedSignalCallback {
1540
+ ($obj: WeakValue): void
1541
+ }
1542
+
1543
+
1544
+ // Constructor properties interface
1545
+
1546
+ interface ConstructorProperties extends GObject.Object.ConstructorProperties {
1547
+
1548
+ // Own constructor properties of JavaScriptCore-6.0.JavaScriptCore.WeakValue
1549
+
1550
+ /**
1551
+ * The #JSCValue referencing the JavaScript value.
1552
+ */
1553
+ value?: Value | null
1554
+ }
1555
+
1556
+ }
1557
+
1558
+ interface WeakValue {
1559
+
1560
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.WeakValue
1561
+
1562
+ /**
1563
+ * The #JSCValue referencing the JavaScript value.
1564
+ */
1565
+ readonly value: Value
1566
+
1567
+ // Owm methods of JavaScriptCore-6.0.JavaScriptCore.WeakValue
1568
+
1569
+ /**
1570
+ * Get a #JSCValue referencing the JavaScript value of `weak_value`.
1571
+ * @returns a new #JSCValue or %NULL if @weak_value was cleared.
1572
+ */
1573
+ get_value(): Value
1574
+
1575
+ // Own signals of JavaScriptCore-6.0.JavaScriptCore.WeakValue
1576
+
1577
+ connect(sigName: "cleared", callback: WeakValue.ClearedSignalCallback): number
1578
+ connect_after(sigName: "cleared", callback: WeakValue.ClearedSignalCallback): number
1579
+ emit(sigName: "cleared", ...args: any[]): void
1580
+
1581
+ // Class property signals of JavaScriptCore-6.0.JavaScriptCore.WeakValue
1582
+
1583
+ connect(sigName: "notify::value", callback: (($obj: WeakValue, pspec: GObject.ParamSpec) => void)): number
1584
+ connect_after(sigName: "notify::value", callback: (($obj: WeakValue, pspec: GObject.ParamSpec) => void)): number
1585
+ emit(sigName: "notify::value", ...args: any[]): void
1586
+ connect(sigName: string, callback: (...args: any[]) => void): number
1587
+ connect_after(sigName: string, callback: (...args: any[]) => void): number
1588
+ emit(sigName: string, ...args: any[]): void
1589
+ disconnect(id: number): void
1590
+ }
1591
+
1592
+ /**
1593
+ * JSCWeakValue represents a weak reference to a value in a #JSCContext. It can be used
1594
+ * to keep a reference to a JavaScript value without protecting it from being garbage
1595
+ * collected and without referencing the #JSCContext either.
1596
+ * @class
1597
+ */
1598
+ class WeakValue extends GObject.Object {
1599
+
1600
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.WeakValue
1601
+
1602
+ static name: string
1603
+ static $gtype: GObject.GType<WeakValue>
1604
+
1605
+ // Constructors of JavaScriptCore-6.0.JavaScriptCore.WeakValue
1606
+
1607
+ constructor(config?: WeakValue.ConstructorProperties)
1608
+ /**
1609
+ * Create a new #JSCWeakValue for the JavaScript value referenced by `value`.
1610
+ * @constructor
1611
+ * @param value a #JSCValue
1612
+ * @returns a new #JSCWeakValue
1613
+ */
1614
+ constructor(value: Value)
1615
+ /**
1616
+ * Create a new #JSCWeakValue for the JavaScript value referenced by `value`.
1617
+ * @constructor
1618
+ * @param value a #JSCValue
1619
+ * @returns a new #JSCWeakValue
1620
+ */
1621
+ static new(value: Value): WeakValue
1622
+ _init(config?: WeakValue.ConstructorProperties): void
1623
+ }
1624
+
1625
+ interface ClassClass {
1626
+
1627
+ // Own fields of JavaScriptCore-6.0.JavaScriptCore.ClassClass
1628
+
1629
+ parent_class: GObject.ObjectClass
1630
+ }
1631
+
1632
+ abstract class ClassClass {
1633
+
1634
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.ClassClass
1635
+
1636
+ static name: string
1637
+ }
1638
+
1639
+ interface ClassVTable {
1640
+
1641
+ // Own fields of JavaScriptCore-6.0.JavaScriptCore.ClassVTable
1642
+
1643
+ /**
1644
+ * a #JSCClassGetPropertyFunction for getting a property.
1645
+ * @field
1646
+ */
1647
+ get_property: ClassGetPropertyFunction
1648
+ /**
1649
+ * a #JSCClassSetPropertyFunction for setting a property.
1650
+ * @field
1651
+ */
1652
+ set_property: ClassSetPropertyFunction
1653
+ /**
1654
+ * a #JSCClassHasPropertyFunction for querying a property.
1655
+ * @field
1656
+ */
1657
+ has_property: ClassHasPropertyFunction
1658
+ /**
1659
+ * a #JSCClassDeletePropertyFunction for deleting a property.
1660
+ * @field
1661
+ */
1662
+ delete_property: ClassDeletePropertyFunction
1663
+ /**
1664
+ * a #JSCClassEnumeratePropertiesFunction for enumerating properties.
1665
+ * @field
1666
+ */
1667
+ enumerate_properties: ClassEnumeratePropertiesFunction
1668
+ }
1669
+
1670
+ /**
1671
+ * Virtual table for a JSCClass. This can be optionally used when registering a #JSCClass in a #JSCContext
1672
+ * to provide a custom implementation for the class. All virtual functions are optional and can be set to
1673
+ * %NULL to fallback to the default implementation.
1674
+ * @record
1675
+ */
1676
+ class ClassVTable {
1677
+
1678
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.ClassVTable
1679
+
1680
+ static name: string
1681
+ }
1682
+
1683
+ interface ContextClass {
1684
+
1685
+ // Own fields of JavaScriptCore-6.0.JavaScriptCore.ContextClass
1686
+
1687
+ parent_class: GObject.ObjectClass
1688
+ }
1689
+
1690
+ abstract class ContextClass {
1691
+
1692
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.ContextClass
1693
+
1694
+ static name: string
1695
+ }
1696
+
1697
+ interface ExceptionClass {
1698
+
1699
+ // Own fields of JavaScriptCore-6.0.JavaScriptCore.ExceptionClass
1700
+
1701
+ parent_class: GObject.ObjectClass
1702
+ }
1703
+
1704
+ abstract class ExceptionClass {
1705
+
1706
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.ExceptionClass
1707
+
1708
+ static name: string
1709
+ }
1710
+
1711
+ interface ValueClass {
1712
+
1713
+ // Own fields of JavaScriptCore-6.0.JavaScriptCore.ValueClass
1714
+
1715
+ parent_class: GObject.ObjectClass
1716
+ }
1717
+
1718
+ abstract class ValueClass {
1719
+
1720
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.ValueClass
1721
+
1722
+ static name: string
1723
+ }
1724
+
1725
+ interface VirtualMachineClass {
1726
+
1727
+ // Own fields of JavaScriptCore-6.0.JavaScriptCore.VirtualMachineClass
1728
+
1729
+ parent_class: GObject.ObjectClass
1730
+ }
1731
+
1732
+ abstract class VirtualMachineClass {
1733
+
1734
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.VirtualMachineClass
1735
+
1736
+ static name: string
1737
+ }
1738
+
1739
+ interface WeakValueClass {
1740
+
1741
+ // Own fields of JavaScriptCore-6.0.JavaScriptCore.WeakValueClass
1742
+
1743
+ parent_class: GObject.ObjectClass
1744
+ }
1745
+
1746
+ abstract class WeakValueClass {
1747
+
1748
+ // Own properties of JavaScriptCore-6.0.JavaScriptCore.WeakValueClass
1749
+
1750
+ static name: string
1751
+ }
1752
+
1753
+ /**
1754
+ * Name of the imported GIR library
1755
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
1756
+ */
1757
+ const __name__: string
1758
+ /**
1759
+ * Version of the imported GIR library
1760
+ * @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
1761
+ */
1762
+ const __version__: string
1763
+ }
1764
+
1765
+ export default JavaScriptCore;
1766
+ // END