@girs/javascriptcore-6.0 2.40.0-3.2.6 → 2.40.0-3.2.8
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-ambient.js +2 -0
- package/javascriptcore-6.0-import.js +3 -0
- package/javascriptcore-6.0.d.cts +50 -58
- package/javascriptcore-6.0.d.ts +50 -58
- package/package.json +13 -7
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.8.
|
|
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
|
|
@@ -624,10 +624,6 @@ export module Context {
|
|
|
624
624
|
|
|
625
625
|
// Own constructor properties of JavaScriptCore-6.0.JavaScriptCore.Context
|
|
626
626
|
|
|
627
|
-
/**
|
|
628
|
-
* The #JSCVirtualMachine in which the context was created.
|
|
629
|
-
*/
|
|
630
|
-
virtual_machine?: VirtualMachine | null
|
|
631
627
|
/**
|
|
632
628
|
* The #JSCVirtualMachine in which the context was created.
|
|
633
629
|
*/
|
|
@@ -640,10 +636,6 @@ export interface Context {
|
|
|
640
636
|
|
|
641
637
|
// Own properties of JavaScriptCore-6.0.JavaScriptCore.Context
|
|
642
638
|
|
|
643
|
-
/**
|
|
644
|
-
* The #JSCVirtualMachine in which the context was created.
|
|
645
|
-
*/
|
|
646
|
-
readonly virtual_machine: VirtualMachine
|
|
647
639
|
/**
|
|
648
640
|
* The #JSCVirtualMachine in which the context was created.
|
|
649
641
|
*/
|
|
@@ -663,7 +655,7 @@ export interface Context {
|
|
|
663
655
|
* @param line_number the starting line number
|
|
664
656
|
* @returns a #JSCCheckSyntaxResult
|
|
665
657
|
*/
|
|
666
|
-
check_syntax(code: string
|
|
658
|
+
check_syntax(code: string, length: number, mode: CheckSyntaxMode, uri: string, line_number: number): [ /* returnType */ CheckSyntaxResult, /* exception */ Exception ]
|
|
667
659
|
/**
|
|
668
660
|
* Clear the uncaught exception in `context` if any.
|
|
669
661
|
*/
|
|
@@ -674,7 +666,7 @@ export interface Context {
|
|
|
674
666
|
* @param length length of `code,` or -1 if `code` is a nul-terminated string
|
|
675
667
|
* @returns a #JSCValue representing the last value generated by the script.
|
|
676
668
|
*/
|
|
677
|
-
evaluate(code: string
|
|
669
|
+
evaluate(code: string, length: number): Value
|
|
678
670
|
/**
|
|
679
671
|
* Evaluate `code` and create an new object where symbols defined in `code` will be added as properties,
|
|
680
672
|
* instead of being added to `context` global object. The new object is returned as `object` parameter.
|
|
@@ -689,7 +681,7 @@ export interface Context {
|
|
|
689
681
|
* @param line_number the starting line number
|
|
690
682
|
* @returns a #JSCValue representing the last value generated by the script.
|
|
691
683
|
*/
|
|
692
|
-
evaluate_in_object(code: string
|
|
684
|
+
evaluate_in_object(code: string, length: number, object_instance: any | null, object_class: Class | null, uri: string, line_number: number): [ /* returnType */ Value, /* object */ Value ]
|
|
693
685
|
/**
|
|
694
686
|
* Evaluate `code` in `context` using `uri` as the source URI. The `line_number` is the starting line number
|
|
695
687
|
* in `uri;` the value is one-based so the first line is 1. `uri` and `line_number` will be shown in exceptions and
|
|
@@ -700,7 +692,7 @@ export interface Context {
|
|
|
700
692
|
* @param line_number the starting line number
|
|
701
693
|
* @returns a #JSCValue representing the last value generated by the script.
|
|
702
694
|
*/
|
|
703
|
-
evaluate_with_source_uri(code: string
|
|
695
|
+
evaluate_with_source_uri(code: string, length: number, uri: string, line_number: number): Value
|
|
704
696
|
/**
|
|
705
697
|
* Get the last unhandled exception thrown in `context` by API functions calls.
|
|
706
698
|
* @returns a #JSCException or %NULL if there isn't any unhandled exception in the #JSCContext.
|
|
@@ -716,7 +708,7 @@ export interface Context {
|
|
|
716
708
|
* @param name the value name
|
|
717
709
|
* @returns a #JSCValue
|
|
718
710
|
*/
|
|
719
|
-
get_value(name: string
|
|
711
|
+
get_value(name: string): Value
|
|
720
712
|
/**
|
|
721
713
|
* Get the #JSCVirtualMachine where `context` was created.
|
|
722
714
|
* @returns the #JSCVirtualMachine where the #JSCContext was created.
|
|
@@ -752,19 +744,19 @@ export interface Context {
|
|
|
752
744
|
* @param destroy_notify a destroy notifier for class instances
|
|
753
745
|
* @returns a #JSCClass
|
|
754
746
|
*/
|
|
755
|
-
register_class(name: string
|
|
747
|
+
register_class(name: string, parent_class: Class | null, vtable: ClassVTable | null, destroy_notify: GLib.DestroyNotify | null): Class
|
|
756
748
|
/**
|
|
757
749
|
* Set a property of `context` global object with `name` and `value`.
|
|
758
750
|
* @param name the value name
|
|
759
751
|
* @param value a #JSCValue
|
|
760
752
|
*/
|
|
761
|
-
set_value(name: string
|
|
753
|
+
set_value(name: string, value: Value): void
|
|
762
754
|
/**
|
|
763
755
|
* Throw an exception to `context` using the given error message. The created #JSCException
|
|
764
756
|
* can be retrieved with jsc_context_get_exception().
|
|
765
757
|
* @param error_message an error message
|
|
766
758
|
*/
|
|
767
|
-
throw(error_message: string
|
|
759
|
+
throw(error_message: string): void
|
|
768
760
|
/**
|
|
769
761
|
* Throw `exception` to `context`.
|
|
770
762
|
* @param exception a #JSCException
|
|
@@ -776,7 +768,7 @@ export interface Context {
|
|
|
776
768
|
* @param error_name the error name
|
|
777
769
|
* @param error_message an error message
|
|
778
770
|
*/
|
|
779
|
-
throw_with_name(error_name: string
|
|
771
|
+
throw_with_name(error_name: string, error_message: string): void
|
|
780
772
|
|
|
781
773
|
// Class property signals of JavaScriptCore-6.0.JavaScriptCore.Context
|
|
782
774
|
|
|
@@ -873,12 +865,12 @@ export interface Exception {
|
|
|
873
865
|
* Get the error message of `exception`.
|
|
874
866
|
* @returns the @exception error message.
|
|
875
867
|
*/
|
|
876
|
-
get_message(): string
|
|
868
|
+
get_message(): string
|
|
877
869
|
/**
|
|
878
870
|
* Get the error name of `exception`
|
|
879
871
|
* @returns the @exception error name.
|
|
880
872
|
*/
|
|
881
|
-
get_name(): string
|
|
873
|
+
get_name(): string
|
|
882
874
|
/**
|
|
883
875
|
* Get the source URI of `exception`.
|
|
884
876
|
* @returns the the source URI of @exception, or %NULL.
|
|
@@ -925,7 +917,7 @@ export class Exception extends GObject.Object {
|
|
|
925
917
|
* @param message the error message
|
|
926
918
|
* @returns a new #JSCException.
|
|
927
919
|
*/
|
|
928
|
-
constructor(context: Context, message: string
|
|
920
|
+
constructor(context: Context, message: string)
|
|
929
921
|
/**
|
|
930
922
|
* Create a new #JSCException in `context` with `message`.
|
|
931
923
|
* @constructor
|
|
@@ -933,7 +925,7 @@ export class Exception extends GObject.Object {
|
|
|
933
925
|
* @param message the error message
|
|
934
926
|
* @returns a new #JSCException.
|
|
935
927
|
*/
|
|
936
|
-
static new(context: Context, message: string
|
|
928
|
+
static new(context: Context, message: string): Exception
|
|
937
929
|
/**
|
|
938
930
|
* Create a new #JSCException in `context` with `name` and `message`.
|
|
939
931
|
* @constructor
|
|
@@ -942,7 +934,7 @@ export class Exception extends GObject.Object {
|
|
|
942
934
|
* @param message the error message
|
|
943
935
|
* @returns a new #JSCException.
|
|
944
936
|
*/
|
|
945
|
-
static new_with_name(context: Context, name: string
|
|
937
|
+
static new_with_name(context: Context, name: string, message: string): Exception
|
|
946
938
|
_init(config?: Exception.ConstructorProperties): void
|
|
947
939
|
}
|
|
948
940
|
|
|
@@ -1119,7 +1111,7 @@ export interface Value {
|
|
|
1119
1111
|
* @param getter a #GCallback to be called to get the property value
|
|
1120
1112
|
* @param setter a #GCallback to be called to set the property value
|
|
1121
1113
|
*/
|
|
1122
|
-
object_define_property_accessor(property_name: string
|
|
1114
|
+
object_define_property_accessor(property_name: string, flags: ValuePropertyFlags, property_type: GObject.GType, getter: GObject.Callback | null, setter: GObject.Callback | null): void
|
|
1123
1115
|
/**
|
|
1124
1116
|
* Define or modify a property with `property_name` in object referenced by `value`. This is equivalent to
|
|
1125
1117
|
* JavaScript <function>Object.defineProperty()</function> when used with a data descriptor.
|
|
@@ -1127,14 +1119,14 @@ export interface Value {
|
|
|
1127
1119
|
* @param flags #JSCValuePropertyFlags
|
|
1128
1120
|
* @param property_value the default property value
|
|
1129
1121
|
*/
|
|
1130
|
-
object_define_property_data(property_name: string
|
|
1122
|
+
object_define_property_data(property_name: string, flags: ValuePropertyFlags, property_value: Value | null): void
|
|
1131
1123
|
/**
|
|
1132
1124
|
* Try to delete property with `name` from `value`. This function will return %FALSE if
|
|
1133
1125
|
* the property was defined without %JSC_VALUE_PROPERTY_CONFIGURABLE flag.
|
|
1134
1126
|
* @param name the property name
|
|
1135
1127
|
* @returns %TRUE if the property was deleted, or %FALSE otherwise.
|
|
1136
1128
|
*/
|
|
1137
|
-
object_delete_property(name: string
|
|
1129
|
+
object_delete_property(name: string): boolean
|
|
1138
1130
|
/**
|
|
1139
1131
|
* Get the list of property names of `value`. Only properties defined with %JSC_VALUE_PROPERTY_ENUMERABLE
|
|
1140
1132
|
* flag will be collected.
|
|
@@ -1146,7 +1138,7 @@ export interface Value {
|
|
|
1146
1138
|
* @param name the property name
|
|
1147
1139
|
* @returns the property #JSCValue.
|
|
1148
1140
|
*/
|
|
1149
|
-
object_get_property(name: string
|
|
1141
|
+
object_get_property(name: string): Value
|
|
1150
1142
|
/**
|
|
1151
1143
|
* Get property at `index` from `value`.
|
|
1152
1144
|
* @param index the property index
|
|
@@ -1158,7 +1150,7 @@ export interface Value {
|
|
|
1158
1150
|
* @param name the property name
|
|
1159
1151
|
* @returns %TRUE if @value has a property with @name, or %FALSE otherwise
|
|
1160
1152
|
*/
|
|
1161
|
-
object_has_property(name: string
|
|
1153
|
+
object_has_property(name: string): boolean
|
|
1162
1154
|
/**
|
|
1163
1155
|
* Invoke method with `name` on object referenced by `value,` passing the given `parameters`. If
|
|
1164
1156
|
* `n_parameters` is 0 no parameters will be passed to the method.
|
|
@@ -1172,19 +1164,19 @@ export interface Value {
|
|
|
1172
1164
|
* @param parameters the #JSCValue<!-- -->s to pass as parameters to the method, or %NULL
|
|
1173
1165
|
* @returns a #JSCValue with the return value of the method.
|
|
1174
1166
|
*/
|
|
1175
|
-
object_invoke_method(name: string
|
|
1167
|
+
object_invoke_method(name: string, parameters: Value[] | null): Value
|
|
1176
1168
|
/**
|
|
1177
1169
|
* Get whether the value referenced by `value` is an instance of class `name`.
|
|
1178
1170
|
* @param name a class name
|
|
1179
1171
|
* @returns whether the value is an object instance of class @name.
|
|
1180
1172
|
*/
|
|
1181
|
-
object_is_instance_of(name: string
|
|
1173
|
+
object_is_instance_of(name: string): boolean
|
|
1182
1174
|
/**
|
|
1183
1175
|
* Set `property` with `name` on `value`.
|
|
1184
1176
|
* @param name the property name
|
|
1185
1177
|
* @param property the #JSCValue to set
|
|
1186
1178
|
*/
|
|
1187
|
-
object_set_property(name: string
|
|
1179
|
+
object_set_property(name: string, property: Value): void
|
|
1188
1180
|
/**
|
|
1189
1181
|
* Set `property` at `index` on `value`.
|
|
1190
1182
|
* @param index the property index
|
|
@@ -1378,7 +1370,7 @@ export class Value extends GObject.Object {
|
|
|
1378
1370
|
* @param json the JSON string to be parsed
|
|
1379
1371
|
* @returns a #JSCValue.
|
|
1380
1372
|
*/
|
|
1381
|
-
static new_from_json(context: Context, json: string
|
|
1373
|
+
static new_from_json(context: Context, json: string): Value
|
|
1382
1374
|
/**
|
|
1383
1375
|
* Create a function in `context`. If `name` is %NULL an anonymous function will be created.
|
|
1384
1376
|
* 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
|
|
@@ -626,10 +626,6 @@ module Context {
|
|
|
626
626
|
|
|
627
627
|
// Own constructor properties of JavaScriptCore-6.0.JavaScriptCore.Context
|
|
628
628
|
|
|
629
|
-
/**
|
|
630
|
-
* The #JSCVirtualMachine in which the context was created.
|
|
631
|
-
*/
|
|
632
|
-
virtual_machine?: VirtualMachine | null
|
|
633
629
|
/**
|
|
634
630
|
* The #JSCVirtualMachine in which the context was created.
|
|
635
631
|
*/
|
|
@@ -642,10 +638,6 @@ interface Context {
|
|
|
642
638
|
|
|
643
639
|
// Own properties of JavaScriptCore-6.0.JavaScriptCore.Context
|
|
644
640
|
|
|
645
|
-
/**
|
|
646
|
-
* The #JSCVirtualMachine in which the context was created.
|
|
647
|
-
*/
|
|
648
|
-
readonly virtual_machine: VirtualMachine
|
|
649
641
|
/**
|
|
650
642
|
* The #JSCVirtualMachine in which the context was created.
|
|
651
643
|
*/
|
|
@@ -665,7 +657,7 @@ interface Context {
|
|
|
665
657
|
* @param line_number the starting line number
|
|
666
658
|
* @returns a #JSCCheckSyntaxResult
|
|
667
659
|
*/
|
|
668
|
-
check_syntax(code: string
|
|
660
|
+
check_syntax(code: string, length: number, mode: CheckSyntaxMode, uri: string, line_number: number): [ /* returnType */ CheckSyntaxResult, /* exception */ Exception ]
|
|
669
661
|
/**
|
|
670
662
|
* Clear the uncaught exception in `context` if any.
|
|
671
663
|
*/
|
|
@@ -676,7 +668,7 @@ interface Context {
|
|
|
676
668
|
* @param length length of `code,` or -1 if `code` is a nul-terminated string
|
|
677
669
|
* @returns a #JSCValue representing the last value generated by the script.
|
|
678
670
|
*/
|
|
679
|
-
evaluate(code: string
|
|
671
|
+
evaluate(code: string, length: number): Value
|
|
680
672
|
/**
|
|
681
673
|
* Evaluate `code` and create an new object where symbols defined in `code` will be added as properties,
|
|
682
674
|
* instead of being added to `context` global object. The new object is returned as `object` parameter.
|
|
@@ -691,7 +683,7 @@ interface Context {
|
|
|
691
683
|
* @param line_number the starting line number
|
|
692
684
|
* @returns a #JSCValue representing the last value generated by the script.
|
|
693
685
|
*/
|
|
694
|
-
evaluate_in_object(code: string
|
|
686
|
+
evaluate_in_object(code: string, length: number, object_instance: any | null, object_class: Class | null, uri: string, line_number: number): [ /* returnType */ Value, /* object */ Value ]
|
|
695
687
|
/**
|
|
696
688
|
* Evaluate `code` in `context` using `uri` as the source URI. The `line_number` is the starting line number
|
|
697
689
|
* in `uri;` the value is one-based so the first line is 1. `uri` and `line_number` will be shown in exceptions and
|
|
@@ -702,7 +694,7 @@ interface Context {
|
|
|
702
694
|
* @param line_number the starting line number
|
|
703
695
|
* @returns a #JSCValue representing the last value generated by the script.
|
|
704
696
|
*/
|
|
705
|
-
evaluate_with_source_uri(code: string
|
|
697
|
+
evaluate_with_source_uri(code: string, length: number, uri: string, line_number: number): Value
|
|
706
698
|
/**
|
|
707
699
|
* Get the last unhandled exception thrown in `context` by API functions calls.
|
|
708
700
|
* @returns a #JSCException or %NULL if there isn't any unhandled exception in the #JSCContext.
|
|
@@ -718,7 +710,7 @@ interface Context {
|
|
|
718
710
|
* @param name the value name
|
|
719
711
|
* @returns a #JSCValue
|
|
720
712
|
*/
|
|
721
|
-
get_value(name: string
|
|
713
|
+
get_value(name: string): Value
|
|
722
714
|
/**
|
|
723
715
|
* Get the #JSCVirtualMachine where `context` was created.
|
|
724
716
|
* @returns the #JSCVirtualMachine where the #JSCContext was created.
|
|
@@ -754,19 +746,19 @@ interface Context {
|
|
|
754
746
|
* @param destroy_notify a destroy notifier for class instances
|
|
755
747
|
* @returns a #JSCClass
|
|
756
748
|
*/
|
|
757
|
-
register_class(name: string
|
|
749
|
+
register_class(name: string, parent_class: Class | null, vtable: ClassVTable | null, destroy_notify: GLib.DestroyNotify | null): Class
|
|
758
750
|
/**
|
|
759
751
|
* Set a property of `context` global object with `name` and `value`.
|
|
760
752
|
* @param name the value name
|
|
761
753
|
* @param value a #JSCValue
|
|
762
754
|
*/
|
|
763
|
-
set_value(name: string
|
|
755
|
+
set_value(name: string, value: Value): void
|
|
764
756
|
/**
|
|
765
757
|
* Throw an exception to `context` using the given error message. The created #JSCException
|
|
766
758
|
* can be retrieved with jsc_context_get_exception().
|
|
767
759
|
* @param error_message an error message
|
|
768
760
|
*/
|
|
769
|
-
throw(error_message: string
|
|
761
|
+
throw(error_message: string): void
|
|
770
762
|
/**
|
|
771
763
|
* Throw `exception` to `context`.
|
|
772
764
|
* @param exception a #JSCException
|
|
@@ -778,7 +770,7 @@ interface Context {
|
|
|
778
770
|
* @param error_name the error name
|
|
779
771
|
* @param error_message an error message
|
|
780
772
|
*/
|
|
781
|
-
throw_with_name(error_name: string
|
|
773
|
+
throw_with_name(error_name: string, error_message: string): void
|
|
782
774
|
|
|
783
775
|
// Class property signals of JavaScriptCore-6.0.JavaScriptCore.Context
|
|
784
776
|
|
|
@@ -875,12 +867,12 @@ interface Exception {
|
|
|
875
867
|
* Get the error message of `exception`.
|
|
876
868
|
* @returns the @exception error message.
|
|
877
869
|
*/
|
|
878
|
-
get_message(): string
|
|
870
|
+
get_message(): string
|
|
879
871
|
/**
|
|
880
872
|
* Get the error name of `exception`
|
|
881
873
|
* @returns the @exception error name.
|
|
882
874
|
*/
|
|
883
|
-
get_name(): string
|
|
875
|
+
get_name(): string
|
|
884
876
|
/**
|
|
885
877
|
* Get the source URI of `exception`.
|
|
886
878
|
* @returns the the source URI of @exception, or %NULL.
|
|
@@ -927,7 +919,7 @@ class Exception extends GObject.Object {
|
|
|
927
919
|
* @param message the error message
|
|
928
920
|
* @returns a new #JSCException.
|
|
929
921
|
*/
|
|
930
|
-
constructor(context: Context, message: string
|
|
922
|
+
constructor(context: Context, message: string)
|
|
931
923
|
/**
|
|
932
924
|
* Create a new #JSCException in `context` with `message`.
|
|
933
925
|
* @constructor
|
|
@@ -935,7 +927,7 @@ class Exception extends GObject.Object {
|
|
|
935
927
|
* @param message the error message
|
|
936
928
|
* @returns a new #JSCException.
|
|
937
929
|
*/
|
|
938
|
-
static new(context: Context, message: string
|
|
930
|
+
static new(context: Context, message: string): Exception
|
|
939
931
|
/**
|
|
940
932
|
* Create a new #JSCException in `context` with `name` and `message`.
|
|
941
933
|
* @constructor
|
|
@@ -944,7 +936,7 @@ class Exception extends GObject.Object {
|
|
|
944
936
|
* @param message the error message
|
|
945
937
|
* @returns a new #JSCException.
|
|
946
938
|
*/
|
|
947
|
-
static new_with_name(context: Context, name: string
|
|
939
|
+
static new_with_name(context: Context, name: string, message: string): Exception
|
|
948
940
|
_init(config?: Exception.ConstructorProperties): void
|
|
949
941
|
}
|
|
950
942
|
|
|
@@ -1121,7 +1113,7 @@ interface Value {
|
|
|
1121
1113
|
* @param getter a #GCallback to be called to get the property value
|
|
1122
1114
|
* @param setter a #GCallback to be called to set the property value
|
|
1123
1115
|
*/
|
|
1124
|
-
object_define_property_accessor(property_name: string
|
|
1116
|
+
object_define_property_accessor(property_name: string, flags: ValuePropertyFlags, property_type: GObject.GType, getter: GObject.Callback | null, setter: GObject.Callback | null): void
|
|
1125
1117
|
/**
|
|
1126
1118
|
* Define or modify a property with `property_name` in object referenced by `value`. This is equivalent to
|
|
1127
1119
|
* JavaScript <function>Object.defineProperty()</function> when used with a data descriptor.
|
|
@@ -1129,14 +1121,14 @@ interface Value {
|
|
|
1129
1121
|
* @param flags #JSCValuePropertyFlags
|
|
1130
1122
|
* @param property_value the default property value
|
|
1131
1123
|
*/
|
|
1132
|
-
object_define_property_data(property_name: string
|
|
1124
|
+
object_define_property_data(property_name: string, flags: ValuePropertyFlags, property_value: Value | null): void
|
|
1133
1125
|
/**
|
|
1134
1126
|
* Try to delete property with `name` from `value`. This function will return %FALSE if
|
|
1135
1127
|
* the property was defined without %JSC_VALUE_PROPERTY_CONFIGURABLE flag.
|
|
1136
1128
|
* @param name the property name
|
|
1137
1129
|
* @returns %TRUE if the property was deleted, or %FALSE otherwise.
|
|
1138
1130
|
*/
|
|
1139
|
-
object_delete_property(name: string
|
|
1131
|
+
object_delete_property(name: string): boolean
|
|
1140
1132
|
/**
|
|
1141
1133
|
* Get the list of property names of `value`. Only properties defined with %JSC_VALUE_PROPERTY_ENUMERABLE
|
|
1142
1134
|
* flag will be collected.
|
|
@@ -1148,7 +1140,7 @@ interface Value {
|
|
|
1148
1140
|
* @param name the property name
|
|
1149
1141
|
* @returns the property #JSCValue.
|
|
1150
1142
|
*/
|
|
1151
|
-
object_get_property(name: string
|
|
1143
|
+
object_get_property(name: string): Value
|
|
1152
1144
|
/**
|
|
1153
1145
|
* Get property at `index` from `value`.
|
|
1154
1146
|
* @param index the property index
|
|
@@ -1160,7 +1152,7 @@ interface Value {
|
|
|
1160
1152
|
* @param name the property name
|
|
1161
1153
|
* @returns %TRUE if @value has a property with @name, or %FALSE otherwise
|
|
1162
1154
|
*/
|
|
1163
|
-
object_has_property(name: string
|
|
1155
|
+
object_has_property(name: string): boolean
|
|
1164
1156
|
/**
|
|
1165
1157
|
* Invoke method with `name` on object referenced by `value,` passing the given `parameters`. If
|
|
1166
1158
|
* `n_parameters` is 0 no parameters will be passed to the method.
|
|
@@ -1174,19 +1166,19 @@ interface Value {
|
|
|
1174
1166
|
* @param parameters the #JSCValue<!-- -->s to pass as parameters to the method, or %NULL
|
|
1175
1167
|
* @returns a #JSCValue with the return value of the method.
|
|
1176
1168
|
*/
|
|
1177
|
-
object_invoke_method(name: string
|
|
1169
|
+
object_invoke_method(name: string, parameters: Value[] | null): Value
|
|
1178
1170
|
/**
|
|
1179
1171
|
* Get whether the value referenced by `value` is an instance of class `name`.
|
|
1180
1172
|
* @param name a class name
|
|
1181
1173
|
* @returns whether the value is an object instance of class @name.
|
|
1182
1174
|
*/
|
|
1183
|
-
object_is_instance_of(name: string
|
|
1175
|
+
object_is_instance_of(name: string): boolean
|
|
1184
1176
|
/**
|
|
1185
1177
|
* Set `property` with `name` on `value`.
|
|
1186
1178
|
* @param name the property name
|
|
1187
1179
|
* @param property the #JSCValue to set
|
|
1188
1180
|
*/
|
|
1189
|
-
object_set_property(name: string
|
|
1181
|
+
object_set_property(name: string, property: Value): void
|
|
1190
1182
|
/**
|
|
1191
1183
|
* Set `property` at `index` on `value`.
|
|
1192
1184
|
* @param index the property index
|
|
@@ -1380,7 +1372,7 @@ class Value extends GObject.Object {
|
|
|
1380
1372
|
* @param json the JSON string to be parsed
|
|
1381
1373
|
* @returns a #JSCValue.
|
|
1382
1374
|
*/
|
|
1383
|
-
static new_from_json(context: Context, json: string
|
|
1375
|
+
static new_from_json(context: Context, json: string): Value
|
|
1384
1376
|
/**
|
|
1385
1377
|
* Create a function in `context`. If `name` is %NULL an anonymous function will be created.
|
|
1386
1378
|
* When the function is called by JavaScript or jsc_value_function_call(), `callback` is called
|
package/package.json
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/javascriptcore-6.0",
|
|
3
|
-
"version": "2.40.0-3.2.
|
|
3
|
+
"version": "2.40.0-3.2.8",
|
|
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",
|
|
7
7
|
"main": "javascriptcore-6.0.js",
|
|
8
8
|
"exports": {
|
|
9
|
-
"./ambient":
|
|
10
|
-
|
|
9
|
+
"./ambient": {
|
|
10
|
+
"types": "./javascriptcore-6.0-ambient.d.ts",
|
|
11
|
+
"default": "./javascriptcore-6.0-ambient.js"
|
|
12
|
+
},
|
|
13
|
+
"./import": {
|
|
14
|
+
"types": "./javascriptcore-6.0-import.d.ts",
|
|
15
|
+
"default": "./javascriptcore-6.0-import.js"
|
|
16
|
+
},
|
|
11
17
|
".": {
|
|
12
18
|
"import": {
|
|
13
19
|
"types": "./javascriptcore-6.0.d.ts",
|
|
@@ -25,9 +31,9 @@
|
|
|
25
31
|
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit javascriptcore-6.0.d.cts"
|
|
26
32
|
},
|
|
27
33
|
"dependencies": {
|
|
28
|
-
"@girs/gjs": "^3.2.
|
|
29
|
-
"@girs/glib-2.0": "^2.
|
|
30
|
-
"@girs/gobject-2.0": "^2.
|
|
34
|
+
"@girs/gjs": "^3.2.8",
|
|
35
|
+
"@girs/glib-2.0": "^2.77.0-3.2.8",
|
|
36
|
+
"@girs/gobject-2.0": "^2.77.0-3.2.8"
|
|
31
37
|
},
|
|
32
38
|
"devDependencies": {
|
|
33
39
|
"typescript": "*"
|
|
@@ -44,7 +50,7 @@
|
|
|
44
50
|
"license": "MIT",
|
|
45
51
|
"repository": {
|
|
46
52
|
"type": "git",
|
|
47
|
-
"url": "git+https://github.com/gjsify/
|
|
53
|
+
"url": "git+https://github.com/gjsify/ts-for-gir.git"
|
|
48
54
|
},
|
|
49
55
|
"bugs": {
|
|
50
56
|
"url": "https://github.com/gjsify/ts-for-gir/issues"
|