@girs/javascriptcore-6.0 2.40.0-3.2.5 → 2.40.0-3.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/javascriptcore-6.0.d.cts +58 -50
- package/javascriptcore-6.0.d.ts +58 -50
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for JavaScriptCore-6.0, generated from library version 2.40.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.
|
|
8
|
+
GJS TypeScript type definitions for JavaScriptCore-6.0, generated from library version 2.40.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.7.
|
|
9
9
|
|
|
10
10
|
WebKitGTK+ is a full-featured port of the WebKit rendering engine, suitable for projects requiring any kind of web integration, from hybrid HTML/CSS applications to full-fledged web browsers. This is the library to use to acces JavaScript from WebKitGTK.
|
|
11
11
|
|
package/javascriptcore-6.0.d.cts
CHANGED
|
@@ -188,25 +188,25 @@ export const MINOR_VERSION: number
|
|
|
188
188
|
* Option type: %JSC_OPTION_BOOLEAN
|
|
189
189
|
* Default value: %TRUE.
|
|
190
190
|
*/
|
|
191
|
-
export const OPTIONS_USE_DFG: string
|
|
191
|
+
export const OPTIONS_USE_DFG: string
|
|
192
192
|
/**
|
|
193
193
|
* Allows the FTL JIT to be used if %TRUE.
|
|
194
194
|
* Option type: %JSC_OPTION_BOOLEAN
|
|
195
195
|
* Default value: %TRUE.
|
|
196
196
|
*/
|
|
197
|
-
export const OPTIONS_USE_FTL: string
|
|
197
|
+
export const OPTIONS_USE_FTL: string
|
|
198
198
|
/**
|
|
199
199
|
* Allows the executable pages to be allocated for JIT and thunks if %TRUE.
|
|
200
200
|
* Option type: %JSC_OPTION_BOOLEAN
|
|
201
201
|
* Default value: %TRUE.
|
|
202
202
|
*/
|
|
203
|
-
export const OPTIONS_USE_JIT: string
|
|
203
|
+
export const OPTIONS_USE_JIT: string
|
|
204
204
|
/**
|
|
205
205
|
* Allows the LLINT to be used if %TRUE.
|
|
206
206
|
* Option type: %JSC_OPTION_BOOLEAN
|
|
207
207
|
* Default value: %TRUE.
|
|
208
208
|
*/
|
|
209
|
-
export const OPTIONS_USE_LLINT: string
|
|
209
|
+
export const OPTIONS_USE_LLINT: string
|
|
210
210
|
/**
|
|
211
211
|
* Returns the major version number of the JavaScriptCore library.
|
|
212
212
|
* (e.g. in JavaScriptCore version 1.8.3 this is 1.)
|
|
@@ -251,19 +251,19 @@ export function options_foreach(function_: OptionsFunc): void
|
|
|
251
251
|
* @param option the option identifier
|
|
252
252
|
* @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
|
|
253
253
|
*/
|
|
254
|
-
export function options_get_boolean(option: string
|
|
254
|
+
export function options_get_boolean(option: string): [ /* returnType */ boolean, /* value */ boolean ]
|
|
255
255
|
/**
|
|
256
256
|
* Get `option` as a #gdouble value.
|
|
257
257
|
* @param option the option identifier
|
|
258
258
|
* @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
|
|
259
259
|
*/
|
|
260
|
-
export function options_get_double(option: string
|
|
260
|
+
export function options_get_double(option: string): [ /* returnType */ boolean, /* value */ number ]
|
|
261
261
|
/**
|
|
262
262
|
* Get `option` as a #gint value.
|
|
263
263
|
* @param option the option identifier
|
|
264
264
|
* @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
|
|
265
265
|
*/
|
|
266
|
-
export function options_get_int(option: string
|
|
266
|
+
export function options_get_int(option: string): [ /* returnType */ boolean, /* value */ number ]
|
|
267
267
|
/**
|
|
268
268
|
* Create a #GOptionGroup to handle JSCOptions as command line arguments.
|
|
269
269
|
* The options will be exposed as command line arguments with the form
|
|
@@ -283,46 +283,46 @@ export function options_get_option_group(): GLib.OptionGroup
|
|
|
283
283
|
* @param option the option identifier
|
|
284
284
|
* @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
|
|
285
285
|
*/
|
|
286
|
-
export function options_get_range_string(option: string
|
|
286
|
+
export function options_get_range_string(option: string): [ /* returnType */ boolean, /* value */ string | null ]
|
|
287
287
|
/**
|
|
288
288
|
* Get `option` as a #gsize value.
|
|
289
289
|
* @param option the option identifier
|
|
290
290
|
* @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
|
|
291
291
|
*/
|
|
292
|
-
export function options_get_size(option: string
|
|
292
|
+
export function options_get_size(option: string): [ /* returnType */ boolean, /* value */ number ]
|
|
293
293
|
/**
|
|
294
294
|
* Get `option` as a string.
|
|
295
295
|
* @param option the option identifier
|
|
296
296
|
* @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
|
|
297
297
|
*/
|
|
298
|
-
export function options_get_string(option: string
|
|
298
|
+
export function options_get_string(option: string): [ /* returnType */ boolean, /* value */ string | null ]
|
|
299
299
|
/**
|
|
300
300
|
* Get `option` as a #guint value.
|
|
301
301
|
* @param option the option identifier
|
|
302
302
|
* @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
|
|
303
303
|
*/
|
|
304
|
-
export function options_get_uint(option: string
|
|
304
|
+
export function options_get_uint(option: string): [ /* returnType */ boolean, /* value */ number ]
|
|
305
305
|
/**
|
|
306
306
|
* Set `option` as a #gboolean value.
|
|
307
307
|
* @param option the option identifier
|
|
308
308
|
* @param value the value to set
|
|
309
309
|
* @returns %TRUE if option was correctly set or %FALSE otherwise.
|
|
310
310
|
*/
|
|
311
|
-
export function options_set_boolean(option: string
|
|
311
|
+
export function options_set_boolean(option: string, value: boolean): boolean
|
|
312
312
|
/**
|
|
313
313
|
* Set `option` as a #gdouble value.
|
|
314
314
|
* @param option the option identifier
|
|
315
315
|
* @param value the value to set
|
|
316
316
|
* @returns %TRUE if option was correctly set or %FALSE otherwise.
|
|
317
317
|
*/
|
|
318
|
-
export function options_set_double(option: string
|
|
318
|
+
export function options_set_double(option: string, value: number): boolean
|
|
319
319
|
/**
|
|
320
320
|
* Set `option` as a #gint value.
|
|
321
321
|
* @param option the option identifier
|
|
322
322
|
* @param value the value to set
|
|
323
323
|
* @returns %TRUE if option was correctly set or %FALSE otherwise.
|
|
324
324
|
*/
|
|
325
|
-
export function options_set_int(option: string
|
|
325
|
+
export function options_set_int(option: string, value: number): boolean
|
|
326
326
|
/**
|
|
327
327
|
* Set `option` as a range string. The string must be in the
|
|
328
328
|
* format <emphasis>[!]<low>[:<high>]</emphasis> where low and high are #guint values.
|
|
@@ -332,28 +332,28 @@ export function options_set_int(option: string | null, value: number): boolean
|
|
|
332
332
|
* @param value the value to set
|
|
333
333
|
* @returns %TRUE if option was correctly set or %FALSE otherwise.
|
|
334
334
|
*/
|
|
335
|
-
export function options_set_range_string(option: string
|
|
335
|
+
export function options_set_range_string(option: string, value: string): boolean
|
|
336
336
|
/**
|
|
337
337
|
* Set `option` as a #gsize value.
|
|
338
338
|
* @param option the option identifier
|
|
339
339
|
* @param value the value to set
|
|
340
340
|
* @returns %TRUE if option was correctly set or %FALSE otherwise.
|
|
341
341
|
*/
|
|
342
|
-
export function options_set_size(option: string
|
|
342
|
+
export function options_set_size(option: string, value: number): boolean
|
|
343
343
|
/**
|
|
344
344
|
* Set `option` as a string.
|
|
345
345
|
* @param option the option identifier
|
|
346
346
|
* @param value the value to set
|
|
347
347
|
* @returns %TRUE if option was correctly set or %FALSE otherwise.
|
|
348
348
|
*/
|
|
349
|
-
export function options_set_string(option: string
|
|
349
|
+
export function options_set_string(option: string, value: string): boolean
|
|
350
350
|
/**
|
|
351
351
|
* Set `option` as a #guint value.
|
|
352
352
|
* @param option the option identifier
|
|
353
353
|
* @param value the value to set
|
|
354
354
|
* @returns %TRUE if option was correctly set or %FALSE otherwise.
|
|
355
355
|
*/
|
|
356
|
-
export function options_set_uint(option: string
|
|
356
|
+
export function options_set_uint(option: string, value: number): boolean
|
|
357
357
|
/**
|
|
358
358
|
* The type of delete_property in #JSCClassVTable. This is only required when you need to handle
|
|
359
359
|
* external properties not added to the prototype.
|
|
@@ -365,7 +365,7 @@ export function options_set_uint(option: string | null, value: number): boolean
|
|
|
365
365
|
* @returns %TRUE if handled or %FALSE to to forward the request to the parent class or prototype chain.
|
|
366
366
|
*/
|
|
367
367
|
export interface ClassDeletePropertyFunction {
|
|
368
|
-
(jsc_class: Class, context: Context, instance: any | null, name: string
|
|
368
|
+
(jsc_class: Class, context: Context, instance: any | null, name: string): boolean
|
|
369
369
|
}
|
|
370
370
|
/**
|
|
371
371
|
* The type of enumerate_properties in #JSCClassVTable. This is only required when you need to handle
|
|
@@ -390,7 +390,7 @@ export interface ClassEnumeratePropertiesFunction {
|
|
|
390
390
|
* @returns a #JSCValue or %NULL to forward the request to the parent class or prototype chain
|
|
391
391
|
*/
|
|
392
392
|
export interface ClassGetPropertyFunction {
|
|
393
|
-
(jsc_class: Class, context: Context, instance: any | null, name: string
|
|
393
|
+
(jsc_class: Class, context: Context, instance: any | null, name: string): Value | null
|
|
394
394
|
}
|
|
395
395
|
/**
|
|
396
396
|
* The type of has_property in #JSCClassVTable. This is only required when you need to handle
|
|
@@ -403,7 +403,7 @@ export interface ClassGetPropertyFunction {
|
|
|
403
403
|
* @returns %TRUE if @instance has a property with @name or %FALSE to forward the request to the parent class or prototype chain.
|
|
404
404
|
*/
|
|
405
405
|
export interface ClassHasPropertyFunction {
|
|
406
|
-
(jsc_class: Class, context: Context, instance: any | null, name: string
|
|
406
|
+
(jsc_class: Class, context: Context, instance: any | null, name: string): boolean
|
|
407
407
|
}
|
|
408
408
|
/**
|
|
409
409
|
* The type of set_property in #JSCClassVTable. This is only required when you need to handle
|
|
@@ -417,7 +417,7 @@ export interface ClassHasPropertyFunction {
|
|
|
417
417
|
* @returns %TRUE if handled or %FALSE to forward the request to the parent class or prototype chain.
|
|
418
418
|
*/
|
|
419
419
|
export interface ClassSetPropertyFunction {
|
|
420
|
-
(jsc_class: Class, context: Context, instance: any | null, name: string
|
|
420
|
+
(jsc_class: Class, context: Context, instance: any | null, name: string, value: Value): boolean
|
|
421
421
|
}
|
|
422
422
|
/**
|
|
423
423
|
* Function used to handle JavaScript exceptions in a #JSCContext.
|
|
@@ -439,7 +439,7 @@ export interface ExceptionHandler {
|
|
|
439
439
|
* @returns %TRUE to stop the iteration, or %FALSE otherwise
|
|
440
440
|
*/
|
|
441
441
|
export interface OptionsFunc {
|
|
442
|
-
(option: string
|
|
442
|
+
(option: string, type: OptionType, description: string | null): boolean
|
|
443
443
|
}
|
|
444
444
|
export module Class {
|
|
445
445
|
|
|
@@ -533,7 +533,7 @@ export interface Class {
|
|
|
533
533
|
* @param callback a #GCallback to be called to invoke method `name` of `jsc_class`
|
|
534
534
|
* @param return_type the #GType of the method return value, or %G_TYPE_NONE if the method is void.
|
|
535
535
|
*/
|
|
536
|
-
add_method_variadic(name: string
|
|
536
|
+
add_method_variadic(name: string, callback: GObject.Callback, return_type: GObject.GType): void
|
|
537
537
|
/**
|
|
538
538
|
* Add method with `name` to `jsc_class`. When the method is called by JavaScript or jsc_value_object_invoke_method(),
|
|
539
539
|
* `callback` is called receiving the class instance as first parameter, followed by the method parameters and then
|
|
@@ -549,7 +549,7 @@ export interface Class {
|
|
|
549
549
|
* @param return_type the #GType of the method return value, or %G_TYPE_NONE if the method is void.
|
|
550
550
|
* @param parameter_types a list of #GType<!-- -->s, one for each parameter, or %NULL
|
|
551
551
|
*/
|
|
552
|
-
add_method(name: string
|
|
552
|
+
add_method(name: string, callback: GObject.Callback, return_type: GObject.GType, parameter_types: GObject.GType[] | null): void
|
|
553
553
|
/**
|
|
554
554
|
* Add a property with `name` to `jsc_class`. When the property value needs to be getted, `getter` is called
|
|
555
555
|
* receiving the the class instance as first parameter and `user_data` as last parameter. When the property
|
|
@@ -566,12 +566,12 @@ export interface Class {
|
|
|
566
566
|
* @param getter a #GCallback to be called to get the property value
|
|
567
567
|
* @param setter a #GCallback to be called to set the property value
|
|
568
568
|
*/
|
|
569
|
-
add_property(name: string
|
|
569
|
+
add_property(name: string, property_type: GObject.GType, getter: GObject.Callback | null, setter: GObject.Callback | null): void
|
|
570
570
|
/**
|
|
571
571
|
* Get the class name of `jsc_class`
|
|
572
572
|
* @returns the name of @jsc_class
|
|
573
573
|
*/
|
|
574
|
-
get_name(): string
|
|
574
|
+
get_name(): string
|
|
575
575
|
/**
|
|
576
576
|
* Get the parent class of `jsc_class`
|
|
577
577
|
* @returns the parent class of @jsc_class
|
|
@@ -628,6 +628,10 @@ export module Context {
|
|
|
628
628
|
* The #JSCVirtualMachine in which the context was created.
|
|
629
629
|
*/
|
|
630
630
|
virtual_machine?: VirtualMachine | null
|
|
631
|
+
/**
|
|
632
|
+
* The #JSCVirtualMachine in which the context was created.
|
|
633
|
+
*/
|
|
634
|
+
virtualMachine?: VirtualMachine | null
|
|
631
635
|
}
|
|
632
636
|
|
|
633
637
|
}
|
|
@@ -640,6 +644,10 @@ export interface Context {
|
|
|
640
644
|
* The #JSCVirtualMachine in which the context was created.
|
|
641
645
|
*/
|
|
642
646
|
readonly virtual_machine: VirtualMachine
|
|
647
|
+
/**
|
|
648
|
+
* The #JSCVirtualMachine in which the context was created.
|
|
649
|
+
*/
|
|
650
|
+
readonly virtualMachine: VirtualMachine
|
|
643
651
|
|
|
644
652
|
// Owm methods of JavaScriptCore-6.0.JavaScriptCore.Context
|
|
645
653
|
|
|
@@ -655,7 +663,7 @@ export interface Context {
|
|
|
655
663
|
* @param line_number the starting line number
|
|
656
664
|
* @returns a #JSCCheckSyntaxResult
|
|
657
665
|
*/
|
|
658
|
-
check_syntax(code: string
|
|
666
|
+
check_syntax(code: string, length: number, mode: CheckSyntaxMode, uri: string, line_number: number): [ /* returnType */ CheckSyntaxResult, /* exception */ Exception ]
|
|
659
667
|
/**
|
|
660
668
|
* Clear the uncaught exception in `context` if any.
|
|
661
669
|
*/
|
|
@@ -666,7 +674,7 @@ export interface Context {
|
|
|
666
674
|
* @param length length of `code,` or -1 if `code` is a nul-terminated string
|
|
667
675
|
* @returns a #JSCValue representing the last value generated by the script.
|
|
668
676
|
*/
|
|
669
|
-
evaluate(code: string
|
|
677
|
+
evaluate(code: string, length: number): Value
|
|
670
678
|
/**
|
|
671
679
|
* Evaluate `code` and create an new object where symbols defined in `code` will be added as properties,
|
|
672
680
|
* instead of being added to `context` global object. The new object is returned as `object` parameter.
|
|
@@ -681,7 +689,7 @@ export interface Context {
|
|
|
681
689
|
* @param line_number the starting line number
|
|
682
690
|
* @returns a #JSCValue representing the last value generated by the script.
|
|
683
691
|
*/
|
|
684
|
-
evaluate_in_object(code: string
|
|
692
|
+
evaluate_in_object(code: string, length: number, object_instance: any | null, object_class: Class | null, uri: string, line_number: number): [ /* returnType */ Value, /* object */ Value ]
|
|
685
693
|
/**
|
|
686
694
|
* Evaluate `code` in `context` using `uri` as the source URI. The `line_number` is the starting line number
|
|
687
695
|
* in `uri;` the value is one-based so the first line is 1. `uri` and `line_number` will be shown in exceptions and
|
|
@@ -692,7 +700,7 @@ export interface Context {
|
|
|
692
700
|
* @param line_number the starting line number
|
|
693
701
|
* @returns a #JSCValue representing the last value generated by the script.
|
|
694
702
|
*/
|
|
695
|
-
evaluate_with_source_uri(code: string
|
|
703
|
+
evaluate_with_source_uri(code: string, length: number, uri: string, line_number: number): Value
|
|
696
704
|
/**
|
|
697
705
|
* Get the last unhandled exception thrown in `context` by API functions calls.
|
|
698
706
|
* @returns a #JSCException or %NULL if there isn't any unhandled exception in the #JSCContext.
|
|
@@ -708,7 +716,7 @@ export interface Context {
|
|
|
708
716
|
* @param name the value name
|
|
709
717
|
* @returns a #JSCValue
|
|
710
718
|
*/
|
|
711
|
-
get_value(name: string
|
|
719
|
+
get_value(name: string): Value
|
|
712
720
|
/**
|
|
713
721
|
* Get the #JSCVirtualMachine where `context` was created.
|
|
714
722
|
* @returns the #JSCVirtualMachine where the #JSCContext was created.
|
|
@@ -744,19 +752,19 @@ export interface Context {
|
|
|
744
752
|
* @param destroy_notify a destroy notifier for class instances
|
|
745
753
|
* @returns a #JSCClass
|
|
746
754
|
*/
|
|
747
|
-
register_class(name: string
|
|
755
|
+
register_class(name: string, parent_class: Class | null, vtable: ClassVTable | null, destroy_notify: GLib.DestroyNotify | null): Class
|
|
748
756
|
/**
|
|
749
757
|
* Set a property of `context` global object with `name` and `value`.
|
|
750
758
|
* @param name the value name
|
|
751
759
|
* @param value a #JSCValue
|
|
752
760
|
*/
|
|
753
|
-
set_value(name: string
|
|
761
|
+
set_value(name: string, value: Value): void
|
|
754
762
|
/**
|
|
755
763
|
* Throw an exception to `context` using the given error message. The created #JSCException
|
|
756
764
|
* can be retrieved with jsc_context_get_exception().
|
|
757
765
|
* @param error_message an error message
|
|
758
766
|
*/
|
|
759
|
-
throw(error_message: string
|
|
767
|
+
throw(error_message: string): void
|
|
760
768
|
/**
|
|
761
769
|
* Throw `exception` to `context`.
|
|
762
770
|
* @param exception a #JSCException
|
|
@@ -768,7 +776,7 @@ export interface Context {
|
|
|
768
776
|
* @param error_name the error name
|
|
769
777
|
* @param error_message an error message
|
|
770
778
|
*/
|
|
771
|
-
throw_with_name(error_name: string
|
|
779
|
+
throw_with_name(error_name: string, error_message: string): void
|
|
772
780
|
|
|
773
781
|
// Class property signals of JavaScriptCore-6.0.JavaScriptCore.Context
|
|
774
782
|
|
|
@@ -865,12 +873,12 @@ export interface Exception {
|
|
|
865
873
|
* Get the error message of `exception`.
|
|
866
874
|
* @returns the @exception error message.
|
|
867
875
|
*/
|
|
868
|
-
get_message(): string
|
|
876
|
+
get_message(): string
|
|
869
877
|
/**
|
|
870
878
|
* Get the error name of `exception`
|
|
871
879
|
* @returns the @exception error name.
|
|
872
880
|
*/
|
|
873
|
-
get_name(): string
|
|
881
|
+
get_name(): string
|
|
874
882
|
/**
|
|
875
883
|
* Get the source URI of `exception`.
|
|
876
884
|
* @returns the the source URI of @exception, or %NULL.
|
|
@@ -917,7 +925,7 @@ export class Exception extends GObject.Object {
|
|
|
917
925
|
* @param message the error message
|
|
918
926
|
* @returns a new #JSCException.
|
|
919
927
|
*/
|
|
920
|
-
constructor(context: Context, message: string
|
|
928
|
+
constructor(context: Context, message: string)
|
|
921
929
|
/**
|
|
922
930
|
* Create a new #JSCException in `context` with `message`.
|
|
923
931
|
* @constructor
|
|
@@ -925,7 +933,7 @@ export class Exception extends GObject.Object {
|
|
|
925
933
|
* @param message the error message
|
|
926
934
|
* @returns a new #JSCException.
|
|
927
935
|
*/
|
|
928
|
-
static new(context: Context, message: string
|
|
936
|
+
static new(context: Context, message: string): Exception
|
|
929
937
|
/**
|
|
930
938
|
* Create a new #JSCException in `context` with `name` and `message`.
|
|
931
939
|
* @constructor
|
|
@@ -934,7 +942,7 @@ export class Exception extends GObject.Object {
|
|
|
934
942
|
* @param message the error message
|
|
935
943
|
* @returns a new #JSCException.
|
|
936
944
|
*/
|
|
937
|
-
static new_with_name(context: Context, name: string
|
|
945
|
+
static new_with_name(context: Context, name: string, message: string): Exception
|
|
938
946
|
_init(config?: Exception.ConstructorProperties): void
|
|
939
947
|
}
|
|
940
948
|
|
|
@@ -1111,7 +1119,7 @@ export interface Value {
|
|
|
1111
1119
|
* @param getter a #GCallback to be called to get the property value
|
|
1112
1120
|
* @param setter a #GCallback to be called to set the property value
|
|
1113
1121
|
*/
|
|
1114
|
-
object_define_property_accessor(property_name: string
|
|
1122
|
+
object_define_property_accessor(property_name: string, flags: ValuePropertyFlags, property_type: GObject.GType, getter: GObject.Callback | null, setter: GObject.Callback | null): void
|
|
1115
1123
|
/**
|
|
1116
1124
|
* Define or modify a property with `property_name` in object referenced by `value`. This is equivalent to
|
|
1117
1125
|
* JavaScript <function>Object.defineProperty()</function> when used with a data descriptor.
|
|
@@ -1119,14 +1127,14 @@ export interface Value {
|
|
|
1119
1127
|
* @param flags #JSCValuePropertyFlags
|
|
1120
1128
|
* @param property_value the default property value
|
|
1121
1129
|
*/
|
|
1122
|
-
object_define_property_data(property_name: string
|
|
1130
|
+
object_define_property_data(property_name: string, flags: ValuePropertyFlags, property_value: Value | null): void
|
|
1123
1131
|
/**
|
|
1124
1132
|
* Try to delete property with `name` from `value`. This function will return %FALSE if
|
|
1125
1133
|
* the property was defined without %JSC_VALUE_PROPERTY_CONFIGURABLE flag.
|
|
1126
1134
|
* @param name the property name
|
|
1127
1135
|
* @returns %TRUE if the property was deleted, or %FALSE otherwise.
|
|
1128
1136
|
*/
|
|
1129
|
-
object_delete_property(name: string
|
|
1137
|
+
object_delete_property(name: string): boolean
|
|
1130
1138
|
/**
|
|
1131
1139
|
* Get the list of property names of `value`. Only properties defined with %JSC_VALUE_PROPERTY_ENUMERABLE
|
|
1132
1140
|
* flag will be collected.
|
|
@@ -1138,7 +1146,7 @@ export interface Value {
|
|
|
1138
1146
|
* @param name the property name
|
|
1139
1147
|
* @returns the property #JSCValue.
|
|
1140
1148
|
*/
|
|
1141
|
-
object_get_property(name: string
|
|
1149
|
+
object_get_property(name: string): Value
|
|
1142
1150
|
/**
|
|
1143
1151
|
* Get property at `index` from `value`.
|
|
1144
1152
|
* @param index the property index
|
|
@@ -1150,7 +1158,7 @@ export interface Value {
|
|
|
1150
1158
|
* @param name the property name
|
|
1151
1159
|
* @returns %TRUE if @value has a property with @name, or %FALSE otherwise
|
|
1152
1160
|
*/
|
|
1153
|
-
object_has_property(name: string
|
|
1161
|
+
object_has_property(name: string): boolean
|
|
1154
1162
|
/**
|
|
1155
1163
|
* Invoke method with `name` on object referenced by `value,` passing the given `parameters`. If
|
|
1156
1164
|
* `n_parameters` is 0 no parameters will be passed to the method.
|
|
@@ -1164,19 +1172,19 @@ export interface Value {
|
|
|
1164
1172
|
* @param parameters the #JSCValue<!-- -->s to pass as parameters to the method, or %NULL
|
|
1165
1173
|
* @returns a #JSCValue with the return value of the method.
|
|
1166
1174
|
*/
|
|
1167
|
-
object_invoke_method(name: string
|
|
1175
|
+
object_invoke_method(name: string, parameters: Value[] | null): Value
|
|
1168
1176
|
/**
|
|
1169
1177
|
* Get whether the value referenced by `value` is an instance of class `name`.
|
|
1170
1178
|
* @param name a class name
|
|
1171
1179
|
* @returns whether the value is an object instance of class @name.
|
|
1172
1180
|
*/
|
|
1173
|
-
object_is_instance_of(name: string
|
|
1181
|
+
object_is_instance_of(name: string): boolean
|
|
1174
1182
|
/**
|
|
1175
1183
|
* Set `property` with `name` on `value`.
|
|
1176
1184
|
* @param name the property name
|
|
1177
1185
|
* @param property the #JSCValue to set
|
|
1178
1186
|
*/
|
|
1179
|
-
object_set_property(name: string
|
|
1187
|
+
object_set_property(name: string, property: Value): void
|
|
1180
1188
|
/**
|
|
1181
1189
|
* Set `property` at `index` on `value`.
|
|
1182
1190
|
* @param index the property index
|
|
@@ -1370,7 +1378,7 @@ export class Value extends GObject.Object {
|
|
|
1370
1378
|
* @param json the JSON string to be parsed
|
|
1371
1379
|
* @returns a #JSCValue.
|
|
1372
1380
|
*/
|
|
1373
|
-
static new_from_json(context: Context, json: string
|
|
1381
|
+
static new_from_json(context: Context, json: string): Value
|
|
1374
1382
|
/**
|
|
1375
1383
|
* Create a function in `context`. If `name` is %NULL an anonymous function will be created.
|
|
1376
1384
|
* When the function is called by JavaScript or jsc_value_function_call(), `callback` is called
|
package/javascriptcore-6.0.d.ts
CHANGED
|
@@ -190,25 +190,25 @@ const MINOR_VERSION: number
|
|
|
190
190
|
* Option type: %JSC_OPTION_BOOLEAN
|
|
191
191
|
* Default value: %TRUE.
|
|
192
192
|
*/
|
|
193
|
-
const OPTIONS_USE_DFG: string
|
|
193
|
+
const OPTIONS_USE_DFG: string
|
|
194
194
|
/**
|
|
195
195
|
* Allows the FTL JIT to be used if %TRUE.
|
|
196
196
|
* Option type: %JSC_OPTION_BOOLEAN
|
|
197
197
|
* Default value: %TRUE.
|
|
198
198
|
*/
|
|
199
|
-
const OPTIONS_USE_FTL: string
|
|
199
|
+
const OPTIONS_USE_FTL: string
|
|
200
200
|
/**
|
|
201
201
|
* Allows the executable pages to be allocated for JIT and thunks if %TRUE.
|
|
202
202
|
* Option type: %JSC_OPTION_BOOLEAN
|
|
203
203
|
* Default value: %TRUE.
|
|
204
204
|
*/
|
|
205
|
-
const OPTIONS_USE_JIT: string
|
|
205
|
+
const OPTIONS_USE_JIT: string
|
|
206
206
|
/**
|
|
207
207
|
* Allows the LLINT to be used if %TRUE.
|
|
208
208
|
* Option type: %JSC_OPTION_BOOLEAN
|
|
209
209
|
* Default value: %TRUE.
|
|
210
210
|
*/
|
|
211
|
-
const OPTIONS_USE_LLINT: string
|
|
211
|
+
const OPTIONS_USE_LLINT: string
|
|
212
212
|
/**
|
|
213
213
|
* Returns the major version number of the JavaScriptCore library.
|
|
214
214
|
* (e.g. in JavaScriptCore version 1.8.3 this is 1.)
|
|
@@ -253,19 +253,19 @@ function options_foreach(function_: OptionsFunc): void
|
|
|
253
253
|
* @param option the option identifier
|
|
254
254
|
* @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
|
|
255
255
|
*/
|
|
256
|
-
function options_get_boolean(option: string
|
|
256
|
+
function options_get_boolean(option: string): [ /* returnType */ boolean, /* value */ boolean ]
|
|
257
257
|
/**
|
|
258
258
|
* Get `option` as a #gdouble value.
|
|
259
259
|
* @param option the option identifier
|
|
260
260
|
* @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
|
|
261
261
|
*/
|
|
262
|
-
function options_get_double(option: string
|
|
262
|
+
function options_get_double(option: string): [ /* returnType */ boolean, /* value */ number ]
|
|
263
263
|
/**
|
|
264
264
|
* Get `option` as a #gint value.
|
|
265
265
|
* @param option the option identifier
|
|
266
266
|
* @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
|
|
267
267
|
*/
|
|
268
|
-
function options_get_int(option: string
|
|
268
|
+
function options_get_int(option: string): [ /* returnType */ boolean, /* value */ number ]
|
|
269
269
|
/**
|
|
270
270
|
* Create a #GOptionGroup to handle JSCOptions as command line arguments.
|
|
271
271
|
* The options will be exposed as command line arguments with the form
|
|
@@ -285,46 +285,46 @@ function options_get_option_group(): GLib.OptionGroup
|
|
|
285
285
|
* @param option the option identifier
|
|
286
286
|
* @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
|
|
287
287
|
*/
|
|
288
|
-
function options_get_range_string(option: string
|
|
288
|
+
function options_get_range_string(option: string): [ /* returnType */ boolean, /* value */ string | null ]
|
|
289
289
|
/**
|
|
290
290
|
* Get `option` as a #gsize value.
|
|
291
291
|
* @param option the option identifier
|
|
292
292
|
* @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
|
|
293
293
|
*/
|
|
294
|
-
function options_get_size(option: string
|
|
294
|
+
function options_get_size(option: string): [ /* returnType */ boolean, /* value */ number ]
|
|
295
295
|
/**
|
|
296
296
|
* Get `option` as a string.
|
|
297
297
|
* @param option the option identifier
|
|
298
298
|
* @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
|
|
299
299
|
*/
|
|
300
|
-
function options_get_string(option: string
|
|
300
|
+
function options_get_string(option: string): [ /* returnType */ boolean, /* value */ string | null ]
|
|
301
301
|
/**
|
|
302
302
|
* Get `option` as a #guint value.
|
|
303
303
|
* @param option the option identifier
|
|
304
304
|
* @returns %TRUE if @value has been set or %FALSE if the option doesn't exist
|
|
305
305
|
*/
|
|
306
|
-
function options_get_uint(option: string
|
|
306
|
+
function options_get_uint(option: string): [ /* returnType */ boolean, /* value */ number ]
|
|
307
307
|
/**
|
|
308
308
|
* Set `option` as a #gboolean value.
|
|
309
309
|
* @param option the option identifier
|
|
310
310
|
* @param value the value to set
|
|
311
311
|
* @returns %TRUE if option was correctly set or %FALSE otherwise.
|
|
312
312
|
*/
|
|
313
|
-
function options_set_boolean(option: string
|
|
313
|
+
function options_set_boolean(option: string, value: boolean): boolean
|
|
314
314
|
/**
|
|
315
315
|
* Set `option` as a #gdouble value.
|
|
316
316
|
* @param option the option identifier
|
|
317
317
|
* @param value the value to set
|
|
318
318
|
* @returns %TRUE if option was correctly set or %FALSE otherwise.
|
|
319
319
|
*/
|
|
320
|
-
function options_set_double(option: string
|
|
320
|
+
function options_set_double(option: string, value: number): boolean
|
|
321
321
|
/**
|
|
322
322
|
* Set `option` as a #gint value.
|
|
323
323
|
* @param option the option identifier
|
|
324
324
|
* @param value the value to set
|
|
325
325
|
* @returns %TRUE if option was correctly set or %FALSE otherwise.
|
|
326
326
|
*/
|
|
327
|
-
function options_set_int(option: string
|
|
327
|
+
function options_set_int(option: string, value: number): boolean
|
|
328
328
|
/**
|
|
329
329
|
* Set `option` as a range string. The string must be in the
|
|
330
330
|
* format <emphasis>[!]<low>[:<high>]</emphasis> where low and high are #guint values.
|
|
@@ -334,28 +334,28 @@ function options_set_int(option: string | null, value: number): boolean
|
|
|
334
334
|
* @param value the value to set
|
|
335
335
|
* @returns %TRUE if option was correctly set or %FALSE otherwise.
|
|
336
336
|
*/
|
|
337
|
-
function options_set_range_string(option: string
|
|
337
|
+
function options_set_range_string(option: string, value: string): boolean
|
|
338
338
|
/**
|
|
339
339
|
* Set `option` as a #gsize value.
|
|
340
340
|
* @param option the option identifier
|
|
341
341
|
* @param value the value to set
|
|
342
342
|
* @returns %TRUE if option was correctly set or %FALSE otherwise.
|
|
343
343
|
*/
|
|
344
|
-
function options_set_size(option: string
|
|
344
|
+
function options_set_size(option: string, value: number): boolean
|
|
345
345
|
/**
|
|
346
346
|
* Set `option` as a string.
|
|
347
347
|
* @param option the option identifier
|
|
348
348
|
* @param value the value to set
|
|
349
349
|
* @returns %TRUE if option was correctly set or %FALSE otherwise.
|
|
350
350
|
*/
|
|
351
|
-
function options_set_string(option: string
|
|
351
|
+
function options_set_string(option: string, value: string): boolean
|
|
352
352
|
/**
|
|
353
353
|
* Set `option` as a #guint value.
|
|
354
354
|
* @param option the option identifier
|
|
355
355
|
* @param value the value to set
|
|
356
356
|
* @returns %TRUE if option was correctly set or %FALSE otherwise.
|
|
357
357
|
*/
|
|
358
|
-
function options_set_uint(option: string
|
|
358
|
+
function options_set_uint(option: string, value: number): boolean
|
|
359
359
|
/**
|
|
360
360
|
* The type of delete_property in #JSCClassVTable. This is only required when you need to handle
|
|
361
361
|
* external properties not added to the prototype.
|
|
@@ -367,7 +367,7 @@ function options_set_uint(option: string | null, value: number): boolean
|
|
|
367
367
|
* @returns %TRUE if handled or %FALSE to to forward the request to the parent class or prototype chain.
|
|
368
368
|
*/
|
|
369
369
|
interface ClassDeletePropertyFunction {
|
|
370
|
-
(jsc_class: Class, context: Context, instance: any | null, name: string
|
|
370
|
+
(jsc_class: Class, context: Context, instance: any | null, name: string): boolean
|
|
371
371
|
}
|
|
372
372
|
/**
|
|
373
373
|
* The type of enumerate_properties in #JSCClassVTable. This is only required when you need to handle
|
|
@@ -392,7 +392,7 @@ interface ClassEnumeratePropertiesFunction {
|
|
|
392
392
|
* @returns a #JSCValue or %NULL to forward the request to the parent class or prototype chain
|
|
393
393
|
*/
|
|
394
394
|
interface ClassGetPropertyFunction {
|
|
395
|
-
(jsc_class: Class, context: Context, instance: any | null, name: string
|
|
395
|
+
(jsc_class: Class, context: Context, instance: any | null, name: string): Value | null
|
|
396
396
|
}
|
|
397
397
|
/**
|
|
398
398
|
* The type of has_property in #JSCClassVTable. This is only required when you need to handle
|
|
@@ -405,7 +405,7 @@ interface ClassGetPropertyFunction {
|
|
|
405
405
|
* @returns %TRUE if @instance has a property with @name or %FALSE to forward the request to the parent class or prototype chain.
|
|
406
406
|
*/
|
|
407
407
|
interface ClassHasPropertyFunction {
|
|
408
|
-
(jsc_class: Class, context: Context, instance: any | null, name: string
|
|
408
|
+
(jsc_class: Class, context: Context, instance: any | null, name: string): boolean
|
|
409
409
|
}
|
|
410
410
|
/**
|
|
411
411
|
* The type of set_property in #JSCClassVTable. This is only required when you need to handle
|
|
@@ -419,7 +419,7 @@ interface ClassHasPropertyFunction {
|
|
|
419
419
|
* @returns %TRUE if handled or %FALSE to forward the request to the parent class or prototype chain.
|
|
420
420
|
*/
|
|
421
421
|
interface ClassSetPropertyFunction {
|
|
422
|
-
(jsc_class: Class, context: Context, instance: any | null, name: string
|
|
422
|
+
(jsc_class: Class, context: Context, instance: any | null, name: string, value: Value): boolean
|
|
423
423
|
}
|
|
424
424
|
/**
|
|
425
425
|
* Function used to handle JavaScript exceptions in a #JSCContext.
|
|
@@ -441,7 +441,7 @@ interface ExceptionHandler {
|
|
|
441
441
|
* @returns %TRUE to stop the iteration, or %FALSE otherwise
|
|
442
442
|
*/
|
|
443
443
|
interface OptionsFunc {
|
|
444
|
-
(option: string
|
|
444
|
+
(option: string, type: OptionType, description: string | null): boolean
|
|
445
445
|
}
|
|
446
446
|
module Class {
|
|
447
447
|
|
|
@@ -535,7 +535,7 @@ interface Class {
|
|
|
535
535
|
* @param callback a #GCallback to be called to invoke method `name` of `jsc_class`
|
|
536
536
|
* @param return_type the #GType of the method return value, or %G_TYPE_NONE if the method is void.
|
|
537
537
|
*/
|
|
538
|
-
add_method_variadic(name: string
|
|
538
|
+
add_method_variadic(name: string, callback: GObject.Callback, return_type: GObject.GType): void
|
|
539
539
|
/**
|
|
540
540
|
* Add method with `name` to `jsc_class`. When the method is called by JavaScript or jsc_value_object_invoke_method(),
|
|
541
541
|
* `callback` is called receiving the class instance as first parameter, followed by the method parameters and then
|
|
@@ -551,7 +551,7 @@ interface Class {
|
|
|
551
551
|
* @param return_type the #GType of the method return value, or %G_TYPE_NONE if the method is void.
|
|
552
552
|
* @param parameter_types a list of #GType<!-- -->s, one for each parameter, or %NULL
|
|
553
553
|
*/
|
|
554
|
-
add_method(name: string
|
|
554
|
+
add_method(name: string, callback: GObject.Callback, return_type: GObject.GType, parameter_types: GObject.GType[] | null): void
|
|
555
555
|
/**
|
|
556
556
|
* Add a property with `name` to `jsc_class`. When the property value needs to be getted, `getter` is called
|
|
557
557
|
* receiving the the class instance as first parameter and `user_data` as last parameter. When the property
|
|
@@ -568,12 +568,12 @@ interface Class {
|
|
|
568
568
|
* @param getter a #GCallback to be called to get the property value
|
|
569
569
|
* @param setter a #GCallback to be called to set the property value
|
|
570
570
|
*/
|
|
571
|
-
add_property(name: string
|
|
571
|
+
add_property(name: string, property_type: GObject.GType, getter: GObject.Callback | null, setter: GObject.Callback | null): void
|
|
572
572
|
/**
|
|
573
573
|
* Get the class name of `jsc_class`
|
|
574
574
|
* @returns the name of @jsc_class
|
|
575
575
|
*/
|
|
576
|
-
get_name(): string
|
|
576
|
+
get_name(): string
|
|
577
577
|
/**
|
|
578
578
|
* Get the parent class of `jsc_class`
|
|
579
579
|
* @returns the parent class of @jsc_class
|
|
@@ -630,6 +630,10 @@ module Context {
|
|
|
630
630
|
* The #JSCVirtualMachine in which the context was created.
|
|
631
631
|
*/
|
|
632
632
|
virtual_machine?: VirtualMachine | null
|
|
633
|
+
/**
|
|
634
|
+
* The #JSCVirtualMachine in which the context was created.
|
|
635
|
+
*/
|
|
636
|
+
virtualMachine?: VirtualMachine | null
|
|
633
637
|
}
|
|
634
638
|
|
|
635
639
|
}
|
|
@@ -642,6 +646,10 @@ interface Context {
|
|
|
642
646
|
* The #JSCVirtualMachine in which the context was created.
|
|
643
647
|
*/
|
|
644
648
|
readonly virtual_machine: VirtualMachine
|
|
649
|
+
/**
|
|
650
|
+
* The #JSCVirtualMachine in which the context was created.
|
|
651
|
+
*/
|
|
652
|
+
readonly virtualMachine: VirtualMachine
|
|
645
653
|
|
|
646
654
|
// Owm methods of JavaScriptCore-6.0.JavaScriptCore.Context
|
|
647
655
|
|
|
@@ -657,7 +665,7 @@ interface Context {
|
|
|
657
665
|
* @param line_number the starting line number
|
|
658
666
|
* @returns a #JSCCheckSyntaxResult
|
|
659
667
|
*/
|
|
660
|
-
check_syntax(code: string
|
|
668
|
+
check_syntax(code: string, length: number, mode: CheckSyntaxMode, uri: string, line_number: number): [ /* returnType */ CheckSyntaxResult, /* exception */ Exception ]
|
|
661
669
|
/**
|
|
662
670
|
* Clear the uncaught exception in `context` if any.
|
|
663
671
|
*/
|
|
@@ -668,7 +676,7 @@ interface Context {
|
|
|
668
676
|
* @param length length of `code,` or -1 if `code` is a nul-terminated string
|
|
669
677
|
* @returns a #JSCValue representing the last value generated by the script.
|
|
670
678
|
*/
|
|
671
|
-
evaluate(code: string
|
|
679
|
+
evaluate(code: string, length: number): Value
|
|
672
680
|
/**
|
|
673
681
|
* Evaluate `code` and create an new object where symbols defined in `code` will be added as properties,
|
|
674
682
|
* instead of being added to `context` global object. The new object is returned as `object` parameter.
|
|
@@ -683,7 +691,7 @@ interface Context {
|
|
|
683
691
|
* @param line_number the starting line number
|
|
684
692
|
* @returns a #JSCValue representing the last value generated by the script.
|
|
685
693
|
*/
|
|
686
|
-
evaluate_in_object(code: string
|
|
694
|
+
evaluate_in_object(code: string, length: number, object_instance: any | null, object_class: Class | null, uri: string, line_number: number): [ /* returnType */ Value, /* object */ Value ]
|
|
687
695
|
/**
|
|
688
696
|
* Evaluate `code` in `context` using `uri` as the source URI. The `line_number` is the starting line number
|
|
689
697
|
* in `uri;` the value is one-based so the first line is 1. `uri` and `line_number` will be shown in exceptions and
|
|
@@ -694,7 +702,7 @@ interface Context {
|
|
|
694
702
|
* @param line_number the starting line number
|
|
695
703
|
* @returns a #JSCValue representing the last value generated by the script.
|
|
696
704
|
*/
|
|
697
|
-
evaluate_with_source_uri(code: string
|
|
705
|
+
evaluate_with_source_uri(code: string, length: number, uri: string, line_number: number): Value
|
|
698
706
|
/**
|
|
699
707
|
* Get the last unhandled exception thrown in `context` by API functions calls.
|
|
700
708
|
* @returns a #JSCException or %NULL if there isn't any unhandled exception in the #JSCContext.
|
|
@@ -710,7 +718,7 @@ interface Context {
|
|
|
710
718
|
* @param name the value name
|
|
711
719
|
* @returns a #JSCValue
|
|
712
720
|
*/
|
|
713
|
-
get_value(name: string
|
|
721
|
+
get_value(name: string): Value
|
|
714
722
|
/**
|
|
715
723
|
* Get the #JSCVirtualMachine where `context` was created.
|
|
716
724
|
* @returns the #JSCVirtualMachine where the #JSCContext was created.
|
|
@@ -746,19 +754,19 @@ interface Context {
|
|
|
746
754
|
* @param destroy_notify a destroy notifier for class instances
|
|
747
755
|
* @returns a #JSCClass
|
|
748
756
|
*/
|
|
749
|
-
register_class(name: string
|
|
757
|
+
register_class(name: string, parent_class: Class | null, vtable: ClassVTable | null, destroy_notify: GLib.DestroyNotify | null): Class
|
|
750
758
|
/**
|
|
751
759
|
* Set a property of `context` global object with `name` and `value`.
|
|
752
760
|
* @param name the value name
|
|
753
761
|
* @param value a #JSCValue
|
|
754
762
|
*/
|
|
755
|
-
set_value(name: string
|
|
763
|
+
set_value(name: string, value: Value): void
|
|
756
764
|
/**
|
|
757
765
|
* Throw an exception to `context` using the given error message. The created #JSCException
|
|
758
766
|
* can be retrieved with jsc_context_get_exception().
|
|
759
767
|
* @param error_message an error message
|
|
760
768
|
*/
|
|
761
|
-
throw(error_message: string
|
|
769
|
+
throw(error_message: string): void
|
|
762
770
|
/**
|
|
763
771
|
* Throw `exception` to `context`.
|
|
764
772
|
* @param exception a #JSCException
|
|
@@ -770,7 +778,7 @@ interface Context {
|
|
|
770
778
|
* @param error_name the error name
|
|
771
779
|
* @param error_message an error message
|
|
772
780
|
*/
|
|
773
|
-
throw_with_name(error_name: string
|
|
781
|
+
throw_with_name(error_name: string, error_message: string): void
|
|
774
782
|
|
|
775
783
|
// Class property signals of JavaScriptCore-6.0.JavaScriptCore.Context
|
|
776
784
|
|
|
@@ -867,12 +875,12 @@ interface Exception {
|
|
|
867
875
|
* Get the error message of `exception`.
|
|
868
876
|
* @returns the @exception error message.
|
|
869
877
|
*/
|
|
870
|
-
get_message(): string
|
|
878
|
+
get_message(): string
|
|
871
879
|
/**
|
|
872
880
|
* Get the error name of `exception`
|
|
873
881
|
* @returns the @exception error name.
|
|
874
882
|
*/
|
|
875
|
-
get_name(): string
|
|
883
|
+
get_name(): string
|
|
876
884
|
/**
|
|
877
885
|
* Get the source URI of `exception`.
|
|
878
886
|
* @returns the the source URI of @exception, or %NULL.
|
|
@@ -919,7 +927,7 @@ class Exception extends GObject.Object {
|
|
|
919
927
|
* @param message the error message
|
|
920
928
|
* @returns a new #JSCException.
|
|
921
929
|
*/
|
|
922
|
-
constructor(context: Context, message: string
|
|
930
|
+
constructor(context: Context, message: string)
|
|
923
931
|
/**
|
|
924
932
|
* Create a new #JSCException in `context` with `message`.
|
|
925
933
|
* @constructor
|
|
@@ -927,7 +935,7 @@ class Exception extends GObject.Object {
|
|
|
927
935
|
* @param message the error message
|
|
928
936
|
* @returns a new #JSCException.
|
|
929
937
|
*/
|
|
930
|
-
static new(context: Context, message: string
|
|
938
|
+
static new(context: Context, message: string): Exception
|
|
931
939
|
/**
|
|
932
940
|
* Create a new #JSCException in `context` with `name` and `message`.
|
|
933
941
|
* @constructor
|
|
@@ -936,7 +944,7 @@ class Exception extends GObject.Object {
|
|
|
936
944
|
* @param message the error message
|
|
937
945
|
* @returns a new #JSCException.
|
|
938
946
|
*/
|
|
939
|
-
static new_with_name(context: Context, name: string
|
|
947
|
+
static new_with_name(context: Context, name: string, message: string): Exception
|
|
940
948
|
_init(config?: Exception.ConstructorProperties): void
|
|
941
949
|
}
|
|
942
950
|
|
|
@@ -1113,7 +1121,7 @@ interface Value {
|
|
|
1113
1121
|
* @param getter a #GCallback to be called to get the property value
|
|
1114
1122
|
* @param setter a #GCallback to be called to set the property value
|
|
1115
1123
|
*/
|
|
1116
|
-
object_define_property_accessor(property_name: string
|
|
1124
|
+
object_define_property_accessor(property_name: string, flags: ValuePropertyFlags, property_type: GObject.GType, getter: GObject.Callback | null, setter: GObject.Callback | null): void
|
|
1117
1125
|
/**
|
|
1118
1126
|
* Define or modify a property with `property_name` in object referenced by `value`. This is equivalent to
|
|
1119
1127
|
* JavaScript <function>Object.defineProperty()</function> when used with a data descriptor.
|
|
@@ -1121,14 +1129,14 @@ interface Value {
|
|
|
1121
1129
|
* @param flags #JSCValuePropertyFlags
|
|
1122
1130
|
* @param property_value the default property value
|
|
1123
1131
|
*/
|
|
1124
|
-
object_define_property_data(property_name: string
|
|
1132
|
+
object_define_property_data(property_name: string, flags: ValuePropertyFlags, property_value: Value | null): void
|
|
1125
1133
|
/**
|
|
1126
1134
|
* Try to delete property with `name` from `value`. This function will return %FALSE if
|
|
1127
1135
|
* the property was defined without %JSC_VALUE_PROPERTY_CONFIGURABLE flag.
|
|
1128
1136
|
* @param name the property name
|
|
1129
1137
|
* @returns %TRUE if the property was deleted, or %FALSE otherwise.
|
|
1130
1138
|
*/
|
|
1131
|
-
object_delete_property(name: string
|
|
1139
|
+
object_delete_property(name: string): boolean
|
|
1132
1140
|
/**
|
|
1133
1141
|
* Get the list of property names of `value`. Only properties defined with %JSC_VALUE_PROPERTY_ENUMERABLE
|
|
1134
1142
|
* flag will be collected.
|
|
@@ -1140,7 +1148,7 @@ interface Value {
|
|
|
1140
1148
|
* @param name the property name
|
|
1141
1149
|
* @returns the property #JSCValue.
|
|
1142
1150
|
*/
|
|
1143
|
-
object_get_property(name: string
|
|
1151
|
+
object_get_property(name: string): Value
|
|
1144
1152
|
/**
|
|
1145
1153
|
* Get property at `index` from `value`.
|
|
1146
1154
|
* @param index the property index
|
|
@@ -1152,7 +1160,7 @@ interface Value {
|
|
|
1152
1160
|
* @param name the property name
|
|
1153
1161
|
* @returns %TRUE if @value has a property with @name, or %FALSE otherwise
|
|
1154
1162
|
*/
|
|
1155
|
-
object_has_property(name: string
|
|
1163
|
+
object_has_property(name: string): boolean
|
|
1156
1164
|
/**
|
|
1157
1165
|
* Invoke method with `name` on object referenced by `value,` passing the given `parameters`. If
|
|
1158
1166
|
* `n_parameters` is 0 no parameters will be passed to the method.
|
|
@@ -1166,19 +1174,19 @@ interface Value {
|
|
|
1166
1174
|
* @param parameters the #JSCValue<!-- -->s to pass as parameters to the method, or %NULL
|
|
1167
1175
|
* @returns a #JSCValue with the return value of the method.
|
|
1168
1176
|
*/
|
|
1169
|
-
object_invoke_method(name: string
|
|
1177
|
+
object_invoke_method(name: string, parameters: Value[] | null): Value
|
|
1170
1178
|
/**
|
|
1171
1179
|
* Get whether the value referenced by `value` is an instance of class `name`.
|
|
1172
1180
|
* @param name a class name
|
|
1173
1181
|
* @returns whether the value is an object instance of class @name.
|
|
1174
1182
|
*/
|
|
1175
|
-
object_is_instance_of(name: string
|
|
1183
|
+
object_is_instance_of(name: string): boolean
|
|
1176
1184
|
/**
|
|
1177
1185
|
* Set `property` with `name` on `value`.
|
|
1178
1186
|
* @param name the property name
|
|
1179
1187
|
* @param property the #JSCValue to set
|
|
1180
1188
|
*/
|
|
1181
|
-
object_set_property(name: string
|
|
1189
|
+
object_set_property(name: string, property: Value): void
|
|
1182
1190
|
/**
|
|
1183
1191
|
* Set `property` at `index` on `value`.
|
|
1184
1192
|
* @param index the property index
|
|
@@ -1372,7 +1380,7 @@ class Value extends GObject.Object {
|
|
|
1372
1380
|
* @param json the JSON string to be parsed
|
|
1373
1381
|
* @returns a #JSCValue.
|
|
1374
1382
|
*/
|
|
1375
|
-
static new_from_json(context: Context, json: string
|
|
1383
|
+
static new_from_json(context: Context, json: string): Value
|
|
1376
1384
|
/**
|
|
1377
1385
|
* Create a function in `context`. If `name` is %NULL an anonymous function will be created.
|
|
1378
1386
|
* When the function is called by JavaScript or jsc_value_function_call(), `callback` is called
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/javascriptcore-6.0",
|
|
3
|
-
"version": "2.40.0-3.2.
|
|
3
|
+
"version": "2.40.0-3.2.7",
|
|
4
4
|
"description": "GJS TypeScript type definitions for JavaScriptCore-6.0, generated from library version 2.40.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "javascriptcore-6.0.js",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit javascriptcore-6.0.d.cts"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@girs/gjs": "^3.2.
|
|
29
|
-
"@girs/glib-2.0": "^2.78.0-3.2.
|
|
30
|
-
"@girs/gobject-2.0": "^2.78.0-3.2.
|
|
28
|
+
"@girs/gjs": "^3.2.7",
|
|
29
|
+
"@girs/glib-2.0": "^2.78.0-3.2.7",
|
|
30
|
+
"@girs/gobject-2.0": "^2.78.0-3.2.7"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"typescript": "*"
|