@girs/javascriptcore-6.0 2.40.0-3.2.6 → 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 CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/javascriptcore-6.0)
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.6.
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
 
@@ -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 | null
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 | null
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 | null
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 | null
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 | null): [ /* returnType */ boolean, /* value */ boolean ]
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 | null): [ /* returnType */ boolean, /* value */ number ]
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 | null): [ /* returnType */ boolean, /* value */ number ]
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 | null): [ /* returnType */ boolean, /* value */ string | null ]
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 | null): [ /* returnType */ boolean, /* value */ number ]
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 | null): [ /* returnType */ boolean, /* value */ string | null ]
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 | null): [ /* returnType */ boolean, /* value */ number ]
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 | null, value: boolean): boolean
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 | null, value: number): boolean
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 | null, value: number): boolean
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>[!]&lt;low&gt;[:&lt;high&gt;]</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 | null, value: string | null): boolean
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 | null, value: number): boolean
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 | null, value: string | null): boolean
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 | null, value: number): boolean
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 | null): boolean
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 | null): Value | null
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 | null): boolean
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 | null, value: Value): boolean
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 | null, type: OptionType, description: string | null): boolean
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 | null, callback: GObject.Callback, return_type: GObject.GType): void
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 | null, callback: GObject.Callback, return_type: GObject.GType, parameter_types: GObject.GType[] | null): void
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 | null, property_type: GObject.GType, getter: GObject.Callback | null, setter: GObject.Callback | null): void
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 | null
574
+ get_name(): string
575
575
  /**
576
576
  * Get the parent class of `jsc_class`
577
577
  * @returns the parent class of @jsc_class
@@ -663,7 +663,7 @@ export interface Context {
663
663
  * @param line_number the starting line number
664
664
  * @returns a #JSCCheckSyntaxResult
665
665
  */
666
- check_syntax(code: string | null, length: number, mode: CheckSyntaxMode, uri: string | null, line_number: number): [ /* returnType */ CheckSyntaxResult, /* exception */ Exception ]
666
+ check_syntax(code: string, length: number, mode: CheckSyntaxMode, uri: string, line_number: number): [ /* returnType */ CheckSyntaxResult, /* exception */ Exception ]
667
667
  /**
668
668
  * Clear the uncaught exception in `context` if any.
669
669
  */
@@ -674,7 +674,7 @@ export interface Context {
674
674
  * @param length length of `code,` or -1 if `code` is a nul-terminated string
675
675
  * @returns a #JSCValue representing the last value generated by the script.
676
676
  */
677
- evaluate(code: string | null, length: number): Value
677
+ evaluate(code: string, length: number): Value
678
678
  /**
679
679
  * Evaluate `code` and create an new object where symbols defined in `code` will be added as properties,
680
680
  * instead of being added to `context` global object. The new object is returned as `object` parameter.
@@ -689,7 +689,7 @@ export interface Context {
689
689
  * @param line_number the starting line number
690
690
  * @returns a #JSCValue representing the last value generated by the script.
691
691
  */
692
- evaluate_in_object(code: string | null, length: number, object_instance: any | null, object_class: Class | null, uri: string | null, line_number: number): [ /* returnType */ Value, /* object */ Value ]
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 ]
693
693
  /**
694
694
  * Evaluate `code` in `context` using `uri` as the source URI. The `line_number` is the starting line number
695
695
  * 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 +700,7 @@ export interface Context {
700
700
  * @param line_number the starting line number
701
701
  * @returns a #JSCValue representing the last value generated by the script.
702
702
  */
703
- evaluate_with_source_uri(code: string | null, length: number, uri: string | null, line_number: number): Value
703
+ evaluate_with_source_uri(code: string, length: number, uri: string, line_number: number): Value
704
704
  /**
705
705
  * Get the last unhandled exception thrown in `context` by API functions calls.
706
706
  * @returns a #JSCException or %NULL if there isn't any unhandled exception in the #JSCContext.
@@ -716,7 +716,7 @@ export interface Context {
716
716
  * @param name the value name
717
717
  * @returns a #JSCValue
718
718
  */
719
- get_value(name: string | null): Value
719
+ get_value(name: string): Value
720
720
  /**
721
721
  * Get the #JSCVirtualMachine where `context` was created.
722
722
  * @returns the #JSCVirtualMachine where the #JSCContext was created.
@@ -752,19 +752,19 @@ export interface Context {
752
752
  * @param destroy_notify a destroy notifier for class instances
753
753
  * @returns a #JSCClass
754
754
  */
755
- register_class(name: string | null, parent_class: Class | null, vtable: ClassVTable | null, destroy_notify: GLib.DestroyNotify | null): Class
755
+ register_class(name: string, parent_class: Class | null, vtable: ClassVTable | null, destroy_notify: GLib.DestroyNotify | null): Class
756
756
  /**
757
757
  * Set a property of `context` global object with `name` and `value`.
758
758
  * @param name the value name
759
759
  * @param value a #JSCValue
760
760
  */
761
- set_value(name: string | null, value: Value): void
761
+ set_value(name: string, value: Value): void
762
762
  /**
763
763
  * Throw an exception to `context` using the given error message. The created #JSCException
764
764
  * can be retrieved with jsc_context_get_exception().
765
765
  * @param error_message an error message
766
766
  */
767
- throw(error_message: string | null): void
767
+ throw(error_message: string): void
768
768
  /**
769
769
  * Throw `exception` to `context`.
770
770
  * @param exception a #JSCException
@@ -776,7 +776,7 @@ export interface Context {
776
776
  * @param error_name the error name
777
777
  * @param error_message an error message
778
778
  */
779
- throw_with_name(error_name: string | null, error_message: string | null): void
779
+ throw_with_name(error_name: string, error_message: string): void
780
780
 
781
781
  // Class property signals of JavaScriptCore-6.0.JavaScriptCore.Context
782
782
 
@@ -873,12 +873,12 @@ export interface Exception {
873
873
  * Get the error message of `exception`.
874
874
  * @returns the @exception error message.
875
875
  */
876
- get_message(): string | null
876
+ get_message(): string
877
877
  /**
878
878
  * Get the error name of `exception`
879
879
  * @returns the @exception error name.
880
880
  */
881
- get_name(): string | null
881
+ get_name(): string
882
882
  /**
883
883
  * Get the source URI of `exception`.
884
884
  * @returns the the source URI of @exception, or %NULL.
@@ -925,7 +925,7 @@ export class Exception extends GObject.Object {
925
925
  * @param message the error message
926
926
  * @returns a new #JSCException.
927
927
  */
928
- constructor(context: Context, message: string | null)
928
+ constructor(context: Context, message: string)
929
929
  /**
930
930
  * Create a new #JSCException in `context` with `message`.
931
931
  * @constructor
@@ -933,7 +933,7 @@ export class Exception extends GObject.Object {
933
933
  * @param message the error message
934
934
  * @returns a new #JSCException.
935
935
  */
936
- static new(context: Context, message: string | null): Exception
936
+ static new(context: Context, message: string): Exception
937
937
  /**
938
938
  * Create a new #JSCException in `context` with `name` and `message`.
939
939
  * @constructor
@@ -942,7 +942,7 @@ export class Exception extends GObject.Object {
942
942
  * @param message the error message
943
943
  * @returns a new #JSCException.
944
944
  */
945
- static new_with_name(context: Context, name: string | null, message: string | null): Exception
945
+ static new_with_name(context: Context, name: string, message: string): Exception
946
946
  _init(config?: Exception.ConstructorProperties): void
947
947
  }
948
948
 
@@ -1119,7 +1119,7 @@ export interface Value {
1119
1119
  * @param getter a #GCallback to be called to get the property value
1120
1120
  * @param setter a #GCallback to be called to set the property value
1121
1121
  */
1122
- object_define_property_accessor(property_name: string | null, flags: ValuePropertyFlags, property_type: GObject.GType, getter: GObject.Callback | null, setter: GObject.Callback | null): void
1122
+ object_define_property_accessor(property_name: string, flags: ValuePropertyFlags, property_type: GObject.GType, getter: GObject.Callback | null, setter: GObject.Callback | null): void
1123
1123
  /**
1124
1124
  * Define or modify a property with `property_name` in object referenced by `value`. This is equivalent to
1125
1125
  * JavaScript <function>Object.defineProperty()</function> when used with a data descriptor.
@@ -1127,14 +1127,14 @@ export interface Value {
1127
1127
  * @param flags #JSCValuePropertyFlags
1128
1128
  * @param property_value the default property value
1129
1129
  */
1130
- object_define_property_data(property_name: string | null, flags: ValuePropertyFlags, property_value: Value | null): void
1130
+ object_define_property_data(property_name: string, flags: ValuePropertyFlags, property_value: Value | null): void
1131
1131
  /**
1132
1132
  * Try to delete property with `name` from `value`. This function will return %FALSE if
1133
1133
  * the property was defined without %JSC_VALUE_PROPERTY_CONFIGURABLE flag.
1134
1134
  * @param name the property name
1135
1135
  * @returns %TRUE if the property was deleted, or %FALSE otherwise.
1136
1136
  */
1137
- object_delete_property(name: string | null): boolean
1137
+ object_delete_property(name: string): boolean
1138
1138
  /**
1139
1139
  * Get the list of property names of `value`. Only properties defined with %JSC_VALUE_PROPERTY_ENUMERABLE
1140
1140
  * flag will be collected.
@@ -1146,7 +1146,7 @@ export interface Value {
1146
1146
  * @param name the property name
1147
1147
  * @returns the property #JSCValue.
1148
1148
  */
1149
- object_get_property(name: string | null): Value
1149
+ object_get_property(name: string): Value
1150
1150
  /**
1151
1151
  * Get property at `index` from `value`.
1152
1152
  * @param index the property index
@@ -1158,7 +1158,7 @@ export interface Value {
1158
1158
  * @param name the property name
1159
1159
  * @returns %TRUE if @value has a property with @name, or %FALSE otherwise
1160
1160
  */
1161
- object_has_property(name: string | null): boolean
1161
+ object_has_property(name: string): boolean
1162
1162
  /**
1163
1163
  * Invoke method with `name` on object referenced by `value,` passing the given `parameters`. If
1164
1164
  * `n_parameters` is 0 no parameters will be passed to the method.
@@ -1172,19 +1172,19 @@ export interface Value {
1172
1172
  * @param parameters the #JSCValue<!-- -->s to pass as parameters to the method, or %NULL
1173
1173
  * @returns a #JSCValue with the return value of the method.
1174
1174
  */
1175
- object_invoke_method(name: string | null, parameters: Value[] | null): Value
1175
+ object_invoke_method(name: string, parameters: Value[] | null): Value
1176
1176
  /**
1177
1177
  * Get whether the value referenced by `value` is an instance of class `name`.
1178
1178
  * @param name a class name
1179
1179
  * @returns whether the value is an object instance of class @name.
1180
1180
  */
1181
- object_is_instance_of(name: string | null): boolean
1181
+ object_is_instance_of(name: string): boolean
1182
1182
  /**
1183
1183
  * Set `property` with `name` on `value`.
1184
1184
  * @param name the property name
1185
1185
  * @param property the #JSCValue to set
1186
1186
  */
1187
- object_set_property(name: string | null, property: Value): void
1187
+ object_set_property(name: string, property: Value): void
1188
1188
  /**
1189
1189
  * Set `property` at `index` on `value`.
1190
1190
  * @param index the property index
@@ -1378,7 +1378,7 @@ export class Value extends GObject.Object {
1378
1378
  * @param json the JSON string to be parsed
1379
1379
  * @returns a #JSCValue.
1380
1380
  */
1381
- static new_from_json(context: Context, json: string | null): Value
1381
+ static new_from_json(context: Context, json: string): Value
1382
1382
  /**
1383
1383
  * Create a function in `context`. If `name` is %NULL an anonymous function will be created.
1384
1384
  * When the function is called by JavaScript or jsc_value_function_call(), `callback` is called
@@ -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 | null
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 | null
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 | null
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 | null
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 | null): [ /* returnType */ boolean, /* value */ boolean ]
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 | null): [ /* returnType */ boolean, /* value */ number ]
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 | null): [ /* returnType */ boolean, /* value */ number ]
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 | null): [ /* returnType */ boolean, /* value */ string | null ]
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 | null): [ /* returnType */ boolean, /* value */ number ]
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 | null): [ /* returnType */ boolean, /* value */ string | null ]
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 | null): [ /* returnType */ boolean, /* value */ number ]
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 | null, value: boolean): boolean
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 | null, value: number): boolean
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 | null, value: number): boolean
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>[!]&lt;low&gt;[:&lt;high&gt;]</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 | null, value: string | null): boolean
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 | null, value: number): boolean
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 | null, value: string | null): boolean
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 | null, value: number): boolean
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 | null): boolean
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 | null): Value | null
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 | null): boolean
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 | null, value: Value): boolean
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 | null, type: OptionType, description: string | null): boolean
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 | null, callback: GObject.Callback, return_type: GObject.GType): void
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 | null, callback: GObject.Callback, return_type: GObject.GType, parameter_types: GObject.GType[] | null): void
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 | null, property_type: GObject.GType, getter: GObject.Callback | null, setter: GObject.Callback | null): void
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 | null
576
+ get_name(): string
577
577
  /**
578
578
  * Get the parent class of `jsc_class`
579
579
  * @returns the parent class of @jsc_class
@@ -665,7 +665,7 @@ interface Context {
665
665
  * @param line_number the starting line number
666
666
  * @returns a #JSCCheckSyntaxResult
667
667
  */
668
- check_syntax(code: string | null, length: number, mode: CheckSyntaxMode, uri: string | null, line_number: number): [ /* returnType */ CheckSyntaxResult, /* exception */ Exception ]
668
+ check_syntax(code: string, length: number, mode: CheckSyntaxMode, uri: string, line_number: number): [ /* returnType */ CheckSyntaxResult, /* exception */ Exception ]
669
669
  /**
670
670
  * Clear the uncaught exception in `context` if any.
671
671
  */
@@ -676,7 +676,7 @@ interface Context {
676
676
  * @param length length of `code,` or -1 if `code` is a nul-terminated string
677
677
  * @returns a #JSCValue representing the last value generated by the script.
678
678
  */
679
- evaluate(code: string | null, length: number): Value
679
+ evaluate(code: string, length: number): Value
680
680
  /**
681
681
  * Evaluate `code` and create an new object where symbols defined in `code` will be added as properties,
682
682
  * instead of being added to `context` global object. The new object is returned as `object` parameter.
@@ -691,7 +691,7 @@ interface Context {
691
691
  * @param line_number the starting line number
692
692
  * @returns a #JSCValue representing the last value generated by the script.
693
693
  */
694
- evaluate_in_object(code: string | null, length: number, object_instance: any | null, object_class: Class | null, uri: string | null, line_number: number): [ /* returnType */ Value, /* object */ Value ]
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 ]
695
695
  /**
696
696
  * Evaluate `code` in `context` using `uri` as the source URI. The `line_number` is the starting line number
697
697
  * 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 +702,7 @@ interface Context {
702
702
  * @param line_number the starting line number
703
703
  * @returns a #JSCValue representing the last value generated by the script.
704
704
  */
705
- evaluate_with_source_uri(code: string | null, length: number, uri: string | null, line_number: number): Value
705
+ evaluate_with_source_uri(code: string, length: number, uri: string, line_number: number): Value
706
706
  /**
707
707
  * Get the last unhandled exception thrown in `context` by API functions calls.
708
708
  * @returns a #JSCException or %NULL if there isn't any unhandled exception in the #JSCContext.
@@ -718,7 +718,7 @@ interface Context {
718
718
  * @param name the value name
719
719
  * @returns a #JSCValue
720
720
  */
721
- get_value(name: string | null): Value
721
+ get_value(name: string): Value
722
722
  /**
723
723
  * Get the #JSCVirtualMachine where `context` was created.
724
724
  * @returns the #JSCVirtualMachine where the #JSCContext was created.
@@ -754,19 +754,19 @@ interface Context {
754
754
  * @param destroy_notify a destroy notifier for class instances
755
755
  * @returns a #JSCClass
756
756
  */
757
- register_class(name: string | null, parent_class: Class | null, vtable: ClassVTable | null, destroy_notify: GLib.DestroyNotify | null): Class
757
+ register_class(name: string, parent_class: Class | null, vtable: ClassVTable | null, destroy_notify: GLib.DestroyNotify | null): Class
758
758
  /**
759
759
  * Set a property of `context` global object with `name` and `value`.
760
760
  * @param name the value name
761
761
  * @param value a #JSCValue
762
762
  */
763
- set_value(name: string | null, value: Value): void
763
+ set_value(name: string, value: Value): void
764
764
  /**
765
765
  * Throw an exception to `context` using the given error message. The created #JSCException
766
766
  * can be retrieved with jsc_context_get_exception().
767
767
  * @param error_message an error message
768
768
  */
769
- throw(error_message: string | null): void
769
+ throw(error_message: string): void
770
770
  /**
771
771
  * Throw `exception` to `context`.
772
772
  * @param exception a #JSCException
@@ -778,7 +778,7 @@ interface Context {
778
778
  * @param error_name the error name
779
779
  * @param error_message an error message
780
780
  */
781
- throw_with_name(error_name: string | null, error_message: string | null): void
781
+ throw_with_name(error_name: string, error_message: string): void
782
782
 
783
783
  // Class property signals of JavaScriptCore-6.0.JavaScriptCore.Context
784
784
 
@@ -875,12 +875,12 @@ interface Exception {
875
875
  * Get the error message of `exception`.
876
876
  * @returns the @exception error message.
877
877
  */
878
- get_message(): string | null
878
+ get_message(): string
879
879
  /**
880
880
  * Get the error name of `exception`
881
881
  * @returns the @exception error name.
882
882
  */
883
- get_name(): string | null
883
+ get_name(): string
884
884
  /**
885
885
  * Get the source URI of `exception`.
886
886
  * @returns the the source URI of @exception, or %NULL.
@@ -927,7 +927,7 @@ class Exception extends GObject.Object {
927
927
  * @param message the error message
928
928
  * @returns a new #JSCException.
929
929
  */
930
- constructor(context: Context, message: string | null)
930
+ constructor(context: Context, message: string)
931
931
  /**
932
932
  * Create a new #JSCException in `context` with `message`.
933
933
  * @constructor
@@ -935,7 +935,7 @@ class Exception extends GObject.Object {
935
935
  * @param message the error message
936
936
  * @returns a new #JSCException.
937
937
  */
938
- static new(context: Context, message: string | null): Exception
938
+ static new(context: Context, message: string): Exception
939
939
  /**
940
940
  * Create a new #JSCException in `context` with `name` and `message`.
941
941
  * @constructor
@@ -944,7 +944,7 @@ class Exception extends GObject.Object {
944
944
  * @param message the error message
945
945
  * @returns a new #JSCException.
946
946
  */
947
- static new_with_name(context: Context, name: string | null, message: string | null): Exception
947
+ static new_with_name(context: Context, name: string, message: string): Exception
948
948
  _init(config?: Exception.ConstructorProperties): void
949
949
  }
950
950
 
@@ -1121,7 +1121,7 @@ interface Value {
1121
1121
  * @param getter a #GCallback to be called to get the property value
1122
1122
  * @param setter a #GCallback to be called to set the property value
1123
1123
  */
1124
- object_define_property_accessor(property_name: string | null, flags: ValuePropertyFlags, property_type: GObject.GType, getter: GObject.Callback | null, setter: GObject.Callback | null): void
1124
+ object_define_property_accessor(property_name: string, flags: ValuePropertyFlags, property_type: GObject.GType, getter: GObject.Callback | null, setter: GObject.Callback | null): void
1125
1125
  /**
1126
1126
  * Define or modify a property with `property_name` in object referenced by `value`. This is equivalent to
1127
1127
  * JavaScript <function>Object.defineProperty()</function> when used with a data descriptor.
@@ -1129,14 +1129,14 @@ interface Value {
1129
1129
  * @param flags #JSCValuePropertyFlags
1130
1130
  * @param property_value the default property value
1131
1131
  */
1132
- object_define_property_data(property_name: string | null, flags: ValuePropertyFlags, property_value: Value | null): void
1132
+ object_define_property_data(property_name: string, flags: ValuePropertyFlags, property_value: Value | null): void
1133
1133
  /**
1134
1134
  * Try to delete property with `name` from `value`. This function will return %FALSE if
1135
1135
  * the property was defined without %JSC_VALUE_PROPERTY_CONFIGURABLE flag.
1136
1136
  * @param name the property name
1137
1137
  * @returns %TRUE if the property was deleted, or %FALSE otherwise.
1138
1138
  */
1139
- object_delete_property(name: string | null): boolean
1139
+ object_delete_property(name: string): boolean
1140
1140
  /**
1141
1141
  * Get the list of property names of `value`. Only properties defined with %JSC_VALUE_PROPERTY_ENUMERABLE
1142
1142
  * flag will be collected.
@@ -1148,7 +1148,7 @@ interface Value {
1148
1148
  * @param name the property name
1149
1149
  * @returns the property #JSCValue.
1150
1150
  */
1151
- object_get_property(name: string | null): Value
1151
+ object_get_property(name: string): Value
1152
1152
  /**
1153
1153
  * Get property at `index` from `value`.
1154
1154
  * @param index the property index
@@ -1160,7 +1160,7 @@ interface Value {
1160
1160
  * @param name the property name
1161
1161
  * @returns %TRUE if @value has a property with @name, or %FALSE otherwise
1162
1162
  */
1163
- object_has_property(name: string | null): boolean
1163
+ object_has_property(name: string): boolean
1164
1164
  /**
1165
1165
  * Invoke method with `name` on object referenced by `value,` passing the given `parameters`. If
1166
1166
  * `n_parameters` is 0 no parameters will be passed to the method.
@@ -1174,19 +1174,19 @@ interface Value {
1174
1174
  * @param parameters the #JSCValue<!-- -->s to pass as parameters to the method, or %NULL
1175
1175
  * @returns a #JSCValue with the return value of the method.
1176
1176
  */
1177
- object_invoke_method(name: string | null, parameters: Value[] | null): Value
1177
+ object_invoke_method(name: string, parameters: Value[] | null): Value
1178
1178
  /**
1179
1179
  * Get whether the value referenced by `value` is an instance of class `name`.
1180
1180
  * @param name a class name
1181
1181
  * @returns whether the value is an object instance of class @name.
1182
1182
  */
1183
- object_is_instance_of(name: string | null): boolean
1183
+ object_is_instance_of(name: string): boolean
1184
1184
  /**
1185
1185
  * Set `property` with `name` on `value`.
1186
1186
  * @param name the property name
1187
1187
  * @param property the #JSCValue to set
1188
1188
  */
1189
- object_set_property(name: string | null, property: Value): void
1189
+ object_set_property(name: string, property: Value): void
1190
1190
  /**
1191
1191
  * Set `property` at `index` on `value`.
1192
1192
  * @param index the property index
@@ -1380,7 +1380,7 @@ class Value extends GObject.Object {
1380
1380
  * @param json the JSON string to be parsed
1381
1381
  * @returns a #JSCValue.
1382
1382
  */
1383
- static new_from_json(context: Context, json: string | null): Value
1383
+ static new_from_json(context: Context, json: string): Value
1384
1384
  /**
1385
1385
  * Create a function in `context`. If `name` is %NULL an anonymous function will be created.
1386
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.6",
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.6",
29
- "@girs/glib-2.0": "^2.78.0-3.2.6",
30
- "@girs/gobject-2.0": "^2.78.0-3.2.6"
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": "*"