@ts-for-gir/lib 4.0.0-beta.2 → 4.0.0-beta.21
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/lib/constants.d.ts +6 -7
- package/lib/constants.js +74 -9
- package/lib/constants.js.map +1 -1
- package/lib/dependency-manager.d.ts +60 -14
- package/lib/dependency-manager.js +148 -46
- package/lib/dependency-manager.js.map +1 -1
- package/lib/generators/dts-inline.d.ts +4 -2
- package/lib/generators/dts-inline.js +10 -12
- package/lib/generators/dts-inline.js.map +1 -1
- package/lib/generators/dts-modules.d.ts +4 -2
- package/lib/generators/dts-modules.js +12 -14
- package/lib/generators/dts-modules.js.map +1 -1
- package/lib/generators/dts.d.ts +2 -2
- package/lib/generators/dts.js +10 -9
- package/lib/generators/dts.js.map +1 -1
- package/lib/generators/generator.d.ts +3 -3
- package/lib/generators/generator.js.map +1 -1
- package/lib/generators/json.d.ts +6 -5
- package/lib/generators/json.js +18 -21
- package/lib/generators/json.js.map +1 -1
- package/lib/generics/clutter.d.ts +15 -0
- package/lib/generics/clutter.js +3 -0
- package/lib/generics/clutter.js.map +1 -1
- package/lib/generics/generify.js +11 -3
- package/lib/generics/generify.js.map +1 -1
- package/lib/generics/gtk.d.ts +7 -0
- package/lib/generics/gtk.js +56 -0
- package/lib/generics/gtk.js.map +1 -0
- package/lib/generics/meta.d.ts +15 -0
- package/lib/generics/meta.js +3 -0
- package/lib/generics/meta.js.map +1 -1
- package/lib/generics/st.d.ts +15 -0
- package/lib/generics/st.js +16 -10
- package/lib/generics/st.js.map +1 -1
- package/lib/generics/visitor.js +5 -9
- package/lib/generics/visitor.js.map +1 -1
- package/lib/gir/alias.d.ts +2 -2
- package/lib/gir/alias.js +3 -3
- package/lib/gir/alias.js.map +1 -1
- package/lib/gir/base.d.ts +3 -3
- package/lib/gir/base.js +2 -14
- package/lib/gir/base.js.map +1 -1
- package/lib/gir/class.d.ts +6 -7
- package/lib/gir/class.js +35 -108
- package/lib/gir/class.js.map +1 -1
- package/lib/gir/const.d.ts +2 -2
- package/lib/gir/const.js +1 -1
- package/lib/gir/const.js.map +1 -1
- package/lib/gir/enum.d.ts +5 -5
- package/lib/gir/enum.js +7 -7
- package/lib/gir/enum.js.map +1 -1
- package/lib/gir/function.d.ts +11 -10
- package/lib/gir/function.js +4 -4
- package/lib/gir/function.js.map +1 -1
- package/lib/gir/index.d.ts +14 -0
- package/lib/gir/index.js +15 -0
- package/lib/gir/index.js.map +1 -0
- package/lib/gir/nodes.d.ts +1 -1
- package/lib/gir/nodes.js +1 -1
- package/lib/gir/nodes.js.map +1 -1
- package/lib/gir/promisify.d.ts +5 -0
- package/lib/gir/promisify.js +158 -0
- package/lib/gir/promisify.js.map +1 -0
- package/lib/gir/property.d.ts +2 -2
- package/lib/gir/property.js.map +1 -1
- package/lib/gir/registry.d.ts +6 -6
- package/lib/gir/registry.js +6 -3
- package/lib/gir/registry.js.map +1 -1
- package/lib/gir/signal.d.ts +2 -2
- package/lib/gir/signal.js.map +1 -1
- package/lib/gir/util.d.ts +3 -3
- package/lib/gir/util.js +17 -14
- package/lib/gir/util.js.map +1 -1
- package/lib/gir-module.d.ts +27 -39
- package/lib/gir-module.js +161 -149
- package/lib/gir-module.js.map +1 -1
- package/lib/gir.d.ts +43 -40
- package/lib/gir.js +28 -27
- package/lib/gir.js.map +1 -1
- package/lib/index.d.ts +1 -2
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/injections/gio.js +133 -1
- package/lib/injections/gio.js.map +1 -1
- package/lib/injections/glib.js +6 -0
- package/lib/injections/glib.js.map +1 -1
- package/lib/injections/gobject.js +84 -64
- package/lib/injections/gobject.js.map +1 -1
- package/lib/injections/gtk4.d.ts +7 -0
- package/lib/injections/gtk4.js +19 -0
- package/lib/injections/gtk4.js.map +1 -0
- package/lib/injections/inject.js +5 -0
- package/lib/injections/inject.js.map +1 -1
- package/lib/injections/shell.d.ts +20 -0
- package/lib/injections/shell.js +34 -0
- package/lib/injections/shell.js.map +1 -0
- package/lib/library-version.d.ts +2 -0
- package/lib/library-version.js +13 -0
- package/lib/library-version.js.map +1 -1
- package/lib/logger.d.ts +18 -16
- package/lib/logger.js +28 -26
- package/lib/logger.js.map +1 -1
- package/lib/messages.d.ts +0 -3
- package/lib/messages.js +0 -3
- package/lib/messages.js.map +1 -1
- package/lib/registry.d.ts +0 -1
- package/lib/registry.js +0 -1
- package/lib/registry.js.map +1 -1
- package/lib/transformation.d.ts +5 -15
- package/lib/transformation.js +9 -89
- package/lib/transformation.js.map +1 -1
- package/lib/types/dependency.d.ts +13 -1
- package/lib/types/format.d.ts +1 -0
- package/lib/types/format.js +2 -0
- package/lib/types/format.js.map +1 -0
- package/lib/types/gir-instance-parameter.d.ts +1 -2
- package/lib/types/gir-module-resolved-by.d.ts +5 -0
- package/lib/types/index.d.ts +7 -2
- package/lib/types/index.js +7 -2
- package/lib/types/index.js.map +1 -1
- package/lib/types/metadata.d.ts +8 -0
- package/lib/types/metadata.js +2 -0
- package/lib/types/metadata.js.map +1 -0
- package/lib/types/options-base.d.ts +4 -0
- package/lib/types/options-base.js +2 -0
- package/lib/types/options-base.js.map +1 -0
- package/lib/types/{generate-config.d.ts → options-generation.d.ts} +21 -11
- package/lib/types/options-generation.js +2 -0
- package/lib/types/options-generation.js.map +1 -0
- package/lib/types/options-load.d.ts +5 -0
- package/lib/types/options-load.js +2 -0
- package/lib/types/options-load.js.map +1 -0
- package/lib/types/options-transform.d.ts +4 -0
- package/lib/types/options-transform.js +2 -0
- package/lib/types/options-transform.js.map +1 -0
- package/lib/types/output-format.d.ts +1 -0
- package/lib/types/output-format.js +2 -0
- package/lib/types/output-format.js.map +1 -0
- package/lib/types/property-case.d.ts +1 -0
- package/lib/types/property-case.js +2 -0
- package/lib/types/property-case.js.map +1 -0
- package/lib/types/template-data.d.ts +2 -2
- package/lib/types/user-config.d.ts +21 -6
- package/lib/utils/files.d.ts +21 -0
- package/lib/utils/files.js +62 -0
- package/lib/utils/files.js.map +1 -0
- package/lib/utils/girs.d.ts +45 -0
- package/lib/utils/girs.js +101 -0
- package/lib/utils/girs.js.map +1 -0
- package/lib/utils/index.d.ts +6 -0
- package/lib/utils/index.js +7 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/numbers.d.ts +6 -0
- package/lib/utils/numbers.js +9 -0
- package/lib/utils/numbers.js.map +1 -0
- package/lib/utils/objects.d.ts +136 -0
- package/lib/utils/objects.js +121 -0
- package/lib/utils/objects.js.map +1 -0
- package/lib/utils/path.d.ts +1 -0
- package/lib/utils/path.js +7 -0
- package/lib/utils/path.js.map +1 -0
- package/lib/utils/strings.d.ts +74 -0
- package/lib/utils/strings.js +121 -0
- package/lib/utils/strings.js.map +1 -0
- package/lib/utils.d.ts +21 -15
- package/lib/utils.js +58 -13
- package/lib/utils.js.map +1 -1
- package/lib/validators/enum-parameters.d.ts +16 -0
- package/lib/validators/enum-parameters.js +42 -0
- package/lib/validators/enum-parameters.js.map +1 -0
- package/lib/validators/function-parameters.d.ts +14 -0
- package/lib/validators/function-parameters.js +31 -0
- package/lib/validators/function-parameters.js.map +1 -0
- package/lib/validators/interface.js +1 -1
- package/lib/validators/interface.js.map +1 -1
- package/package.json +15 -14
- package/lib/conflict-resolver.d.ts +0 -119
- package/lib/conflict-resolver.js +0 -893
- package/lib/conflict-resolver.js.map +0 -1
- package/lib/generators/dts/gio.d.ts +0 -2
- package/lib/generators/dts/gio.js +0 -9
- package/lib/generators/dts/gio.js.map +0 -1
- package/lib/gir-factory.d.ts +0 -52
- package/lib/gir-factory.js +0 -340
- package/lib/gir-factory.js.map +0 -1
- package/lib/injection/callbacks/gjs/Gio-2.0.d.ts +0 -2
- package/lib/injection/callbacks/gjs/Gio-2.0.js +0 -36
- package/lib/injection/callbacks/gjs/Gio-2.0.js.map +0 -1
- package/lib/injection/callbacks/gjs/index.d.ts +0 -2
- package/lib/injection/callbacks/gjs/index.js +0 -3
- package/lib/injection/callbacks/gjs/index.js.map +0 -1
- package/lib/injection/callbacks/index.d.ts +0 -3
- package/lib/injection/callbacks/index.js +0 -3
- package/lib/injection/callbacks/index.js.map +0 -1
- package/lib/injection/classes/gjs/gio-2.0.d.ts +0 -5
- package/lib/injection/classes/gjs/gio-2.0.js +0 -254
- package/lib/injection/classes/gjs/gio-2.0.js.map +0 -1
- package/lib/injection/classes/gjs/glib-2.0.d.ts +0 -2
- package/lib/injection/classes/gjs/glib-2.0.js +0 -225
- package/lib/injection/classes/gjs/glib-2.0.js.map +0 -1
- package/lib/injection/classes/gjs/gobject-2.0.d.ts +0 -2
- package/lib/injection/classes/gjs/gobject-2.0.js +0 -634
- package/lib/injection/classes/gjs/gobject-2.0.js.map +0 -1
- package/lib/injection/classes/gjs/index.d.ts +0 -2
- package/lib/injection/classes/gjs/index.js +0 -5
- package/lib/injection/classes/gjs/index.js.map +0 -1
- package/lib/injection/classes/glib-2.0.d.ts +0 -2
- package/lib/injection/classes/glib-2.0.js +0 -35
- package/lib/injection/classes/glib-2.0.js.map +0 -1
- package/lib/injection/classes/index.d.ts +0 -3
- package/lib/injection/classes/index.js +0 -4
- package/lib/injection/classes/index.js.map +0 -1
- package/lib/injection/index.d.ts +0 -3
- package/lib/injection/index.js +0 -4
- package/lib/injection/index.js.map +0 -1
- package/lib/injection/injector.d.ts +0 -16
- package/lib/injection/injector.js +0 -138
- package/lib/injection/injector.js.map +0 -1
- package/lib/symtable.d.ts +0 -24
- package/lib/symtable.js +0 -63
- package/lib/symtable.js.map +0 -1
- package/lib/types/conflict-child-element.d.ts +0 -10
- package/lib/types/conflict-child-element.js +0 -2
- package/lib/types/conflict-child-element.js.map +0 -1
- package/lib/types/conflict-grouped-element.d.ts +0 -6
- package/lib/types/conflict-grouped-element.js +0 -2
- package/lib/types/conflict-grouped-element.js.map +0 -1
- package/lib/types/conflict-grouped-elements.d.ts +0 -4
- package/lib/types/conflict-grouped-elements.js +0 -2
- package/lib/types/conflict-grouped-elements.js.map +0 -1
- package/lib/types/generate-config.js +0 -2
- package/lib/types/generate-config.js.map +0 -1
- package/lib/types/injection-callback.d.ts +0 -16
- package/lib/types/injection-callback.js +0 -2
- package/lib/types/injection-callback.js.map +0 -1
- package/lib/types/injection-class.d.ts +0 -25
- package/lib/types/injection-class.js +0 -2
- package/lib/types/injection-class.js.map +0 -1
- package/lib/types/injection-function.d.ts +0 -7
- package/lib/types/injection-function.js +0 -2
- package/lib/types/injection-function.js.map +0 -1
- package/lib/types/injection-generic-parameter.d.ts +0 -2
- package/lib/types/injection-generic-parameter.js +0 -2
- package/lib/types/injection-generic-parameter.js.map +0 -1
- package/lib/types/injection-instance-parameter.d.ts +0 -2
- package/lib/types/injection-instance-parameter.js +0 -2
- package/lib/types/injection-instance-parameter.js.map +0 -1
- package/lib/types/injection-parameter.d.ts +0 -8
- package/lib/types/injection-parameter.js +0 -2
- package/lib/types/injection-parameter.js.map +0 -1
- package/lib/types/injection-property.d.ts +0 -4
- package/lib/types/injection-property.js +0 -2
- package/lib/types/injection-property.js.map +0 -1
- package/lib/types/injection-type.d.ts +0 -2
- package/lib/types/injection-type.js +0 -2
- package/lib/types/injection-type.js.map +0 -1
- package/lib/types/injection.d.ts +0 -5
- package/lib/types/injection.js +0 -2
- package/lib/types/injection.js.map +0 -1
- package/lib/types/promisify-func.d.ts +0 -7
- package/lib/types/promisify-func.js +0 -2
- package/lib/types/promisify-func.js.map +0 -1
- package/lib/types/sym-table-items.d.ts +0 -4
- package/lib/types/sym-table-items.js +0 -2
- package/lib/types/sym-table-items.js.map +0 -1
- package/lib/types/ts-alias.d.ts +0 -10
- package/lib/types/ts-alias.js +0 -2
- package/lib/types/ts-alias.js.map +0 -1
- package/lib/types/ts-callback-interface.d.ts +0 -10
- package/lib/types/ts-callback-interface.js +0 -2
- package/lib/types/ts-callback-interface.js.map +0 -1
- package/lib/types/ts-callback.d.ts +0 -17
- package/lib/types/ts-callback.js +0 -2
- package/lib/types/ts-callback.js.map +0 -1
- package/lib/types/ts-class.d.ts +0 -85
- package/lib/types/ts-class.js +0 -2
- package/lib/types/ts-class.js.map +0 -1
- package/lib/types/ts-enum.d.ts +0 -12
- package/lib/types/ts-enum.js +0 -2
- package/lib/types/ts-enum.js.map +0 -1
- package/lib/types/ts-function.d.ts +0 -55
- package/lib/types/ts-function.js +0 -2
- package/lib/types/ts-function.js.map +0 -1
- package/lib/types/ts-generic-parameter.d.ts +0 -8
- package/lib/types/ts-generic-parameter.js +0 -2
- package/lib/types/ts-generic-parameter.js.map +0 -1
- package/lib/types/ts-instance-parameter.d.ts +0 -4
- package/lib/types/ts-instance-parameter.js +0 -2
- package/lib/types/ts-instance-parameter.js.map +0 -1
- package/lib/types/ts-member.d.ts +0 -10
- package/lib/types/ts-member.js +0 -2
- package/lib/types/ts-member.js.map +0 -1
- package/lib/types/ts-method.d.ts +0 -5
- package/lib/types/ts-method.js +0 -2
- package/lib/types/ts-method.js.map +0 -1
- package/lib/types/ts-parameter.d.ts +0 -15
- package/lib/types/ts-parameter.js +0 -2
- package/lib/types/ts-parameter.js.map +0 -1
- package/lib/types/ts-property.d.ts +0 -17
- package/lib/types/ts-property.js +0 -2
- package/lib/types/ts-property.js.map +0 -1
- package/lib/types/ts-signal.d.ts +0 -17
- package/lib/types/ts-signal.js +0 -2
- package/lib/types/ts-signal.js.map +0 -1
- package/lib/types/ts-type-name.d.ts +0 -1
- package/lib/types/ts-type-name.js +0 -2
- package/lib/types/ts-type-name.js.map +0 -1
- package/lib/types/ts-type-separator.d.ts +0 -1
- package/lib/types/ts-type-separator.js +0 -2
- package/lib/types/ts-type-separator.js.map +0 -1
- package/lib/types/ts-type.d.ts +0 -26
- package/lib/types/ts-type.js +0 -2
- package/lib/types/ts-type.js.map +0 -1
- package/lib/types/ts-var.d.ts +0 -17
- package/lib/types/ts-var.js +0 -2
- package/lib/types/ts-var.js.map +0 -1
- package/lib/types.d.ts +0 -23
- package/lib/types.js +0 -2
- package/lib/types.js.map +0 -1
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export const classesGLib20All = [
|
|
2
|
-
{
|
|
3
|
-
versions: ['2.0'],
|
|
4
|
-
qualifiedName: 'GLib.List',
|
|
5
|
-
generics: [
|
|
6
|
-
{
|
|
7
|
-
name: 'A',
|
|
8
|
-
value: 'any',
|
|
9
|
-
},
|
|
10
|
-
],
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
versions: ['2.0'],
|
|
14
|
-
qualifiedName: 'GLib.HashTable',
|
|
15
|
-
// TODO
|
|
16
|
-
// [key: A]: B;
|
|
17
|
-
// properties: [
|
|
18
|
-
// {
|
|
19
|
-
// name: '[key: A]'
|
|
20
|
-
// type: 'B'
|
|
21
|
-
// }
|
|
22
|
-
// ],
|
|
23
|
-
generics: [
|
|
24
|
-
{
|
|
25
|
-
name: 'A',
|
|
26
|
-
value: 'symbol | string | number',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: 'B',
|
|
30
|
-
value: 'string | number | boolean',
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
];
|
|
35
|
-
//# sourceMappingURL=glib-2.0.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"glib-2.0.js","sourceRoot":"","sources":["../../../src/injection/classes/glib-2.0.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAqB;IAC9C;QACI,QAAQ,EAAE,CAAC,KAAK,CAAC;QACjB,aAAa,EAAE,WAAW;QAC1B,QAAQ,EAAE;YACN;gBACI,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,KAAK;aACf;SACJ;KACJ;IACD;QACI,QAAQ,EAAE,CAAC,KAAK,CAAC;QACjB,aAAa,EAAE,gBAAgB;QAC/B,OAAO;QACP,eAAe;QACf,gBAAgB;QAChB,QAAQ;QACR,2BAA2B;QAC3B,oBAAoB;QACpB,QAAQ;QACR,KAAK;QACL,QAAQ,EAAE;YACN;gBACI,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,0BAA0B;aACpC;YACD;gBACI,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,2BAA2B;aACrC;SACJ;KACJ;CACJ,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/injection/classes/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,MAAM,CAAC,MAAM,UAAU,GAAqB,CAAC,GAAG,gBAAgB,CAAC,CAAA"}
|
package/lib/injection/index.d.ts
DELETED
package/lib/injection/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/injection/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { GirClassElement, GirRecordElement, GirUnionElement, GirInterfaceElement, GirCallbackElement, GirCallableParamElement } from '../types/index.js';
|
|
2
|
-
import { Logger } from '../logger.js';
|
|
3
|
-
import { GirFactory } from '../gir-factory.js';
|
|
4
|
-
/**
|
|
5
|
-
* Inject additional methods, properties, etc
|
|
6
|
-
*/
|
|
7
|
-
export declare class Injector {
|
|
8
|
-
girFactory: GirFactory;
|
|
9
|
-
log: Logger;
|
|
10
|
-
constructor();
|
|
11
|
-
/** Inject additional generics, methods, properties, etc to a existing class */
|
|
12
|
-
toClass(girClass: GirClassElement | GirUnionElement | GirInterfaceElement | GirRecordElement): GirUnionElement | GirInterfaceElement | GirRecordElement | undefined;
|
|
13
|
-
/** Inject additional generics to existing callback interfaces */
|
|
14
|
-
toCallback(girCallback: GirCallbackElement): GirCallbackElement;
|
|
15
|
-
toParameterType(girParam: GirCallableParamElement): GirCallableParamElement;
|
|
16
|
-
}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { Logger } from '../logger.js';
|
|
2
|
-
import { classesAll, classesGjs, callbacksGjs, callbacksAll } from './index.js';
|
|
3
|
-
import { GirFactory } from '../gir-factory.js';
|
|
4
|
-
/**
|
|
5
|
-
* Inject additional methods, properties, etc
|
|
6
|
-
*/
|
|
7
|
-
export class Injector {
|
|
8
|
-
girFactory = new GirFactory();
|
|
9
|
-
log;
|
|
10
|
-
constructor() {
|
|
11
|
-
this.log = new Logger(true, 'ConflictResolver');
|
|
12
|
-
}
|
|
13
|
-
/** Inject additional generics, methods, properties, etc to a existing class */
|
|
14
|
-
toClass(girClass) {
|
|
15
|
-
if (!girClass._tsData) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const classes = [...classesAll, ...classesGjs];
|
|
19
|
-
const toClass = classes.find((cls) => {
|
|
20
|
-
return (girClass._tsData &&
|
|
21
|
-
cls.qualifiedName === girClass._tsData.qualifiedName &&
|
|
22
|
-
cls.versions.includes(girClass._tsData.version));
|
|
23
|
-
});
|
|
24
|
-
if (!toClass) {
|
|
25
|
-
return girClass;
|
|
26
|
-
}
|
|
27
|
-
if (toClass.staticFunctions) {
|
|
28
|
-
girClass._tsData.staticFunctions.push(...this.girFactory.newGirFunctions(toClass.staticFunctions, girClass._tsData, { isInjected: true }));
|
|
29
|
-
}
|
|
30
|
-
if (toClass.properties) {
|
|
31
|
-
girClass._tsData.properties.push(...this.girFactory.newGirProperties(toClass.properties, { isInjected: true }));
|
|
32
|
-
}
|
|
33
|
-
if (toClass.constructors) {
|
|
34
|
-
girClass._tsData.constructors.push(...this.girFactory.newGirFunctions(toClass.constructors, girClass._tsData, { isInjected: true }));
|
|
35
|
-
}
|
|
36
|
-
if (toClass.methods) {
|
|
37
|
-
girClass._tsData.methods.push(...this.girFactory.newGirFunctions(toClass.methods, girClass._tsData, { isInjected: true }));
|
|
38
|
-
}
|
|
39
|
-
if (toClass.virtualMethods) {
|
|
40
|
-
girClass._tsData.virtualMethods.push(...this.girFactory.newGirFunctions(toClass.virtualMethods, girClass._tsData, { isInjected: true }));
|
|
41
|
-
}
|
|
42
|
-
if (toClass.propertySignalMethods) {
|
|
43
|
-
for (const propertySignalMethod of toClass.propertySignalMethods) {
|
|
44
|
-
propertySignalMethod.isInjected = true;
|
|
45
|
-
girClass._tsData.propertySignalMethods.push(propertySignalMethod);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
if (toClass.generics) {
|
|
49
|
-
girClass._tsData.generics.push(...this.girFactory.newGenerics(toClass.generics));
|
|
50
|
-
}
|
|
51
|
-
return girClass;
|
|
52
|
-
}
|
|
53
|
-
/** Inject additional generics to existing callback interfaces */
|
|
54
|
-
toCallback(girCallback) {
|
|
55
|
-
const callbacks = [...callbacksAll, ...callbacksGjs];
|
|
56
|
-
if (!girCallback._module || !girCallback._tsData) {
|
|
57
|
-
return girCallback;
|
|
58
|
-
}
|
|
59
|
-
const toCallback = callbacks.find((injectCallback) => {
|
|
60
|
-
return (girCallback._module &&
|
|
61
|
-
girCallback._tsData &&
|
|
62
|
-
injectCallback.name === girCallback._tsData.name &&
|
|
63
|
-
girCallback._module.namespace === injectCallback.namespace &&
|
|
64
|
-
injectCallback.versions.includes(girCallback._module.version));
|
|
65
|
-
});
|
|
66
|
-
// if (toCallback?.generics) {
|
|
67
|
-
// girCallback._tsData.generics.push(...this.girFactory.newGenerics(toCallback.generics))
|
|
68
|
-
// }
|
|
69
|
-
// NOTICE: We merge the in parameters here
|
|
70
|
-
// TODO: Unify injections, merges and overrides
|
|
71
|
-
if (toCallback?.inParams) {
|
|
72
|
-
for (let i = 0; i < girCallback._tsData.inParams.length; i++) {
|
|
73
|
-
const newInParam = toCallback.inParams[i];
|
|
74
|
-
const oldInParam = girCallback._tsData.inParams[i];
|
|
75
|
-
if (newInParam && oldInParam && oldInParam._tsData?.name === newInParam.name) {
|
|
76
|
-
oldInParam._tsData.type = this.girFactory.newTsTypes(newInParam.type);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
if (toCallback?.tsCallbackInterface) {
|
|
81
|
-
if (toCallback?.tsCallbackInterface.generics) {
|
|
82
|
-
girCallback._tsData.tsCallbackInterface?.generics.push(...this.girFactory.newGenerics(toCallback.tsCallbackInterface.generics));
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return girCallback;
|
|
86
|
-
}
|
|
87
|
-
toParameterType(girParam) {
|
|
88
|
-
const tsTypes = girParam._tsData?.type;
|
|
89
|
-
const callbacks = [...callbacksAll, ...callbacksGjs];
|
|
90
|
-
if (!girParam._module || !girParam._tsData) {
|
|
91
|
-
return girParam;
|
|
92
|
-
}
|
|
93
|
-
// Use the the callback generic injections also for the type of the callback parameters
|
|
94
|
-
if (tsTypes) {
|
|
95
|
-
for (const tsType of tsTypes) {
|
|
96
|
-
const toCallback = callbacks.find((injectCallback) => {
|
|
97
|
-
return (girParam._module &&
|
|
98
|
-
girParam._tsData &&
|
|
99
|
-
// TODO: compare versions
|
|
100
|
-
`${injectCallback.namespace}.${injectCallback.name}` === tsType.type);
|
|
101
|
-
});
|
|
102
|
-
if (toCallback?.generics) {
|
|
103
|
-
const tsFunc = girParam._tsData.parent;
|
|
104
|
-
const tsClass = tsFunc.parent;
|
|
105
|
-
for (const generic of toCallback.generics) {
|
|
106
|
-
// Currently only used for `Gio.AsyncReadyCallback`
|
|
107
|
-
if (generic.value === 'this') {
|
|
108
|
-
if (tsFunc.isStatic && tsClass) {
|
|
109
|
-
tsType.generics.push({
|
|
110
|
-
...generic,
|
|
111
|
-
value: `${tsClass.namespace}.${tsClass.name}`,
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
else if (tsFunc.isGlobal) {
|
|
115
|
-
// Add generic parameter to global function
|
|
116
|
-
tsFunc.generics.push({
|
|
117
|
-
name: 'Z',
|
|
118
|
-
value: 'unknown',
|
|
119
|
-
});
|
|
120
|
-
tsType.generics.push({
|
|
121
|
-
value: 'Z',
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
tsType.generics.push(generic);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
tsType.generics.push(generic);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return girParam;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
//# sourceMappingURL=injector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injector.js","sourceRoot":"","sources":["../../src/injection/injector.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE9C;;GAEG;AACH,MAAM,OAAO,QAAQ;IACjB,UAAU,GAAG,IAAI,UAAU,EAAE,CAAA;IAC7B,GAAG,CAAQ;IAEX;QACI,IAAI,CAAC,GAAG,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAA;IACnD,CAAC;IAED,+EAA+E;IAC/E,OAAO,CAAC,QAAoF;QACxF,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACpB,OAAM;QACV,CAAC;QAED,MAAM,OAAO,GAAG,CAAC,GAAG,UAAU,EAAE,GAAG,UAAU,CAAC,CAAA;QAE9C,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YACjC,OAAO,CACH,QAAQ,CAAC,OAAO;gBAChB,GAAG,CAAC,aAAa,KAAK,QAAQ,CAAC,OAAO,CAAC,aAAa;gBACpD,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAClD,CAAA;QACL,CAAC,CAAC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C,IAAI,CAAC,OAAO,CAAC,CAAA;wBACjC,CAAC;oBACL,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;QAED,OAAO,QAAQ,CAAA;IACnB,CAAC;CACJ"}
|
package/lib/symtable.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { GenerateConfig, GirAnyElement, Dependency } from './types/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* The SymTable is used to get any Type from any dependency to compare or to get information from
|
|
4
|
-
*/
|
|
5
|
-
export declare class SymTable {
|
|
6
|
-
private readonly config;
|
|
7
|
-
private readonly modPackageName;
|
|
8
|
-
private readonly modNamespace;
|
|
9
|
-
/**
|
|
10
|
-
* The items are static because any GirModule has the same items to be able to access the types of dependencies as well
|
|
11
|
-
*/
|
|
12
|
-
private static items;
|
|
13
|
-
private log;
|
|
14
|
-
constructor(config: GenerateConfig, modPackageName: string, modNamespace: string);
|
|
15
|
-
/**
|
|
16
|
-
* Get symTable key, we use this method to prepend the package version to each key to prevent version conflicts e.g. in 'Gtk-3.0' and 'Gtk-4.0'
|
|
17
|
-
* @param implementation E.g. Gtk.Window
|
|
18
|
-
* @returns E.g. 'Gtk-3.0.Gtk.Window'
|
|
19
|
-
*/
|
|
20
|
-
getKey(dependencies: Dependency[], implementation: string): string | null;
|
|
21
|
-
get<T = object>(dependencies: Dependency[], fullTypeName: string): T | null;
|
|
22
|
-
getByHand<T = GirAnyElement>(key: string): T | null;
|
|
23
|
-
set(dependencies: Dependency[], fullTypeName: string, GirElement: GirAnyElement): void;
|
|
24
|
-
}
|
package/lib/symtable.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Logger } from './logger.js';
|
|
2
|
-
import { WARN_NOT_FOUND_PACKAGE_NAME } from './messages.js';
|
|
3
|
-
/**
|
|
4
|
-
* The SymTable is used to get any Type from any dependency to compare or to get information from
|
|
5
|
-
*/
|
|
6
|
-
export class SymTable {
|
|
7
|
-
config;
|
|
8
|
-
modPackageName;
|
|
9
|
-
modNamespace;
|
|
10
|
-
/**
|
|
11
|
-
* The items are static because any GirModule has the same items to be able to access the types of dependencies as well
|
|
12
|
-
*/
|
|
13
|
-
static items = {};
|
|
14
|
-
log;
|
|
15
|
-
constructor(config, modPackageName, modNamespace) {
|
|
16
|
-
this.config = config;
|
|
17
|
-
this.modPackageName = modPackageName;
|
|
18
|
-
this.modNamespace = modNamespace;
|
|
19
|
-
this.log = new Logger(this.config.verbose, 'SymTable');
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Get symTable key, we use this method to prepend the package version to each key to prevent version conflicts e.g. in 'Gtk-3.0' and 'Gtk-4.0'
|
|
23
|
-
* @param implementation E.g. Gtk.Window
|
|
24
|
-
* @returns E.g. 'Gtk-3.0.Gtk.Window'
|
|
25
|
-
*/
|
|
26
|
-
getKey(dependencies, implementation) {
|
|
27
|
-
if (implementation.startsWith(this.modPackageName + '.')) {
|
|
28
|
-
return implementation;
|
|
29
|
-
}
|
|
30
|
-
if (implementation.startsWith(this.modNamespace + '.')) {
|
|
31
|
-
return this.modPackageName + '.' + implementation;
|
|
32
|
-
}
|
|
33
|
-
if (!implementation.includes('.')) {
|
|
34
|
-
return this.modPackageName + '.' + this.modNamespace + '.' + implementation;
|
|
35
|
-
}
|
|
36
|
-
const split = implementation.split('.');
|
|
37
|
-
const namespace = split[0];
|
|
38
|
-
const packageName = dependencies.find((dependency) => dependency.packageName.startsWith(namespace + '-'))?.packageName;
|
|
39
|
-
if (!packageName) {
|
|
40
|
-
this.log.warn(WARN_NOT_FOUND_PACKAGE_NAME(namespace, implementation));
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
return packageName + '.' + implementation;
|
|
44
|
-
}
|
|
45
|
-
get(dependencies, fullTypeName) {
|
|
46
|
-
const key = this.getKey(dependencies, fullTypeName);
|
|
47
|
-
if (!key || !SymTable.items[key]) {
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
const result = SymTable.items[key] || null;
|
|
51
|
-
return result;
|
|
52
|
-
}
|
|
53
|
-
getByHand(key) {
|
|
54
|
-
return (SymTable.items[key] || null);
|
|
55
|
-
}
|
|
56
|
-
set(dependencies, fullTypeName, GirElement) {
|
|
57
|
-
const key = this.getKey(dependencies, fullTypeName);
|
|
58
|
-
if (key) {
|
|
59
|
-
SymTable.items[key] = GirElement;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=symtable.js.map
|
package/lib/symtable.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"symtable.js","sourceRoot":"","sources":["../src/symtable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAA;AAE3D;;GAEG;AACH,MAAM,OAAO,QAAQ;IAQI;IACA;IACA;IATrB;;OAEG;IACK,MAAM,CAAC,KAAK,GAAkB,EAAE,CAAA;IAChC,GAAG,CAAQ;IAEnB,YACqB,MAAsB,EACtB,cAAsB,EACtB,YAAoB;QAFpB,WAAM,GAAN,MAAM,CAAgB;QACtB,mBAAc,GAAd,cAAc,CAAQ;QACtB,iBAAY,GAAZ,YAAY,CAAQ;QAErC,IAAI,CAAC,GAAG,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,CAAA;IAC1D,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,YAA0B,EAAE,cAAsB;QAC5D,IAAI,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,EAAE,CAAC;YACvD,OAAO,cAAc,CAAA;QACzB,CAAC;QAED,IAAI,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,EAAE,CAAC;YACrD,OAAO,IAAI,CAAC,cAAc,GAAG,GAAG,GAAG,cAAc,CAAA;QAC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AG,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC,CAAA;QACnD,IAAI,GAAG,EAAE,CAAC;YACN,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,UAAU,CAAA;QACpC,CAAC;IACL,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { TsFunction, TsProperty, TsVar } from './index.js';
|
|
2
|
-
export interface ConflictChildElement<T = TsFunction | TsProperty | TsVar> {
|
|
3
|
-
/**
|
|
4
|
-
* The depth of the inheritance, starts at 1.
|
|
5
|
-
* 1 means it is a direct inheritance,
|
|
6
|
-
* greater means it is an indirect inheritance
|
|
7
|
-
*/
|
|
8
|
-
depth: number;
|
|
9
|
-
data: T;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conflict-child-element.js","sourceRoot":"","sources":["../../src/types/conflict-child-element.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { TsFunction, TsProperty, TsVar, TsClass, ConflictChildElement } from './index.js';
|
|
2
|
-
export interface ConflictGroupedElement<T = TsFunction | TsProperty | TsVar> {
|
|
3
|
-
baseElements: ConflictChildElement<T>[];
|
|
4
|
-
inheritedElements: ConflictChildElement<T>[];
|
|
5
|
-
baseClass: TsClass;
|
|
6
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conflict-grouped-element.js","sourceRoot":"","sources":["../../src/types/conflict-grouped-element.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conflict-grouped-elements.js","sourceRoot":"","sources":["../../src/types/conflict-grouped-elements.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate-config.js","sourceRoot":"","sources":["../../src/types/generate-config.ts"],"names":[],"mappings":""}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { InjectionGenericParameter, InjectionParameter } from './index.js';
|
|
2
|
-
/** Interface to inject additional methods, properties, etc to a class */
|
|
3
|
-
export interface InjectionCallback {
|
|
4
|
-
/** The versions on which the injections are to be applied. E.g. `["3.0", "2.0"]` */
|
|
5
|
-
versions: string[];
|
|
6
|
-
/** The versions on which the injections are to be applied. E.g. `"Gtk"` */
|
|
7
|
-
namespace: string;
|
|
8
|
-
name: string;
|
|
9
|
-
/** Generic type parameters */
|
|
10
|
-
generics?: InjectionGenericParameter[];
|
|
11
|
-
inParams?: InjectionParameter[];
|
|
12
|
-
tsCallbackInterface: {
|
|
13
|
-
/** Generic type parameters */
|
|
14
|
-
generics?: InjectionGenericParameter[];
|
|
15
|
-
};
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injection-callback.js","sourceRoot":"","sources":["../../src/types/injection-callback.ts"],"names":[],"mappings":""}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { InjectionFunction, InjectionGenericParameter, InjectionProperty, TsMethod } from './index.js';
|
|
2
|
-
/** Interface to inject additional methods, properties, etc to a class */
|
|
3
|
-
export interface InjectionClass {
|
|
4
|
-
/** The versions on which the injections are to be applied. E.g. `["3.0", "2.0"]` */
|
|
5
|
-
versions: string[];
|
|
6
|
-
/** The class namespace and name on which the injections are to be applied. E.g. "Gtk.Window "*/
|
|
7
|
-
qualifiedName: string;
|
|
8
|
-
/** Fields of the base class itself */
|
|
9
|
-
/** Properties of the base class itself */
|
|
10
|
-
properties?: InjectionProperty[];
|
|
11
|
-
/** Constructor properties of the base class itself */
|
|
12
|
-
/** Array of signal methods for GObject properties */
|
|
13
|
-
propertySignalMethods?: TsMethod[];
|
|
14
|
-
/** Methods of the base class itself */
|
|
15
|
-
methods?: InjectionFunction[];
|
|
16
|
-
/** Virtual methods of the base class itself */
|
|
17
|
-
virtualMethods?: InjectionFunction[];
|
|
18
|
-
/** Constructor methods of the base class itself */
|
|
19
|
-
constructors?: InjectionFunction[];
|
|
20
|
-
/** Static functions of the base class itself */
|
|
21
|
-
staticFunctions?: InjectionFunction[];
|
|
22
|
-
/** Signals of the base class itself */
|
|
23
|
-
/** Generic type parameters */
|
|
24
|
-
generics?: InjectionGenericParameter[];
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injection-class.js","sourceRoot":"","sources":["../../src/types/injection-class.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { TsFunction, InjectionParameter, InjectionInstanceParameter, InjectionType, GirCallableParamElement, GirInstanceParameter } from './index.js';
|
|
2
|
-
export interface InjectionFunction extends Pick<TsFunction, 'name' | 'girTypeName'>, Partial<Pick<TsFunction, 'isArrowType' | 'isStatic' | 'isGlobal' | 'isVirtual' | 'isInjected' | 'isPromise' | 'overloads' | 'generics' | 'doc' | 'parent'>> {
|
|
3
|
-
returnTypes?: InjectionType[];
|
|
4
|
-
inParams?: Array<InjectionParameter | GirCallableParamElement>;
|
|
5
|
-
outParams?: Array<InjectionParameter | GirCallableParamElement>;
|
|
6
|
-
instanceParameters?: Array<InjectionInstanceParameter | GirInstanceParameter>;
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injection-function.js","sourceRoot":"","sources":["../../src/types/injection-function.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injection-generic-parameter.js","sourceRoot":"","sources":["../../src/types/injection-generic-parameter.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injection-instance-parameter.js","sourceRoot":"","sources":["../../src/types/injection-instance-parameter.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injection-parameter.js","sourceRoot":"","sources":["../../src/types/injection-parameter.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injection-property.js","sourceRoot":"","sources":["../../src/types/injection-property.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injection-type.js","sourceRoot":"","sources":["../../src/types/injection-type.ts"],"names":[],"mappings":""}
|
package/lib/types/injection.d.ts
DELETED
package/lib/types/injection.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injection.js","sourceRoot":"","sources":["../../src/types/injection.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promisify-func.js","sourceRoot":"","sources":["../../src/types/promisify-func.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sym-table-items.js","sourceRoot":"","sources":["../../src/types/sym-table-items.ts"],"names":[],"mappings":""}
|
package/lib/types/ts-alias.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Holds the data to generate an alias in/for Typescript
|
|
3
|
-
*/
|
|
4
|
-
export interface TsAlias {
|
|
5
|
-
name: string;
|
|
6
|
-
type: string;
|
|
7
|
-
girTypeName: 'alias';
|
|
8
|
-
/** Will be exported in Typescript as "type": `export type = ${name} = ${type}` */
|
|
9
|
-
tsTypeName: 'type';
|
|
10
|
-
}
|
package/lib/types/ts-alias.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ts-alias.js","sourceRoot":"","sources":["../../src/types/ts-alias.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { TsDoc, TsGenericParameter } from './index.js';
|
|
2
|
-
/**
|
|
3
|
-
* Holds the data to generate an interface for `GirCallbackElements` in/for Typescript
|
|
4
|
-
*/
|
|
5
|
-
export interface TsCallbackInterface {
|
|
6
|
-
name: string;
|
|
7
|
-
overwriteDoc?: Partial<TsDoc>;
|
|
8
|
-
/** Generic type parameter of this callback interface */
|
|
9
|
-
generics: TsGenericParameter[];
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ts-callback-interface.js","sourceRoot":"","sources":["../../src/types/ts-callback-interface.ts"],"names":[],"mappings":""}
|