@ts-for-gir/lib 4.0.0-beta.37 → 4.0.0-beta.38

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.
Files changed (62) hide show
  1. package/package.json +4 -4
  2. package/src/types/answer-version.ts +2 -2
  3. package/src/types/any-introspected-type.ts +3 -1
  4. package/src/types/class-function-types.ts +41 -33
  5. package/src/types/class-parent.ts +11 -11
  6. package/src/types/class.ts +26 -28
  7. package/src/types/config-flags.ts +2 -2
  8. package/src/types/construct-name.ts +12 -12
  9. package/src/types/dependency-map.ts +2 -2
  10. package/src/types/dependency.ts +45 -45
  11. package/src/types/file-info.ts +12 -12
  12. package/src/types/format.ts +1 -1
  13. package/src/types/generator-constructor.ts +4 -4
  14. package/src/types/generics-config.ts +1 -1
  15. package/src/types/gir-any-element.ts +33 -33
  16. package/src/types/gir-module-interface.ts +5 -5
  17. package/src/types/gir-module-resolved.ts +1 -1
  18. package/src/types/gir-type-name.ts +17 -17
  19. package/src/types/index.ts +88 -90
  20. package/src/types/inheritance-table.ts +1 -1
  21. package/src/types/introspected.ts +8 -8
  22. package/src/types/local-name-check.ts +2 -2
  23. package/src/types/local-name-type.ts +1 -1
  24. package/src/types/local-name.ts +5 -5
  25. package/src/types/local-names.ts +2 -2
  26. package/src/types/metadata.ts +4 -4
  27. package/src/types/ns-loader.ts +2 -3
  28. package/src/types/options-base.ts +6 -6
  29. package/src/types/options-generation.ts +47 -47
  30. package/src/types/options-load.ts +3 -3
  31. package/src/types/options-transform.ts +2 -2
  32. package/src/types/output-format.ts +1 -1
  33. package/src/types/package-data-parsed.ts +26 -26
  34. package/src/types/package-data.ts +21 -21
  35. package/src/types/package-section-parsed.ts +6 -6
  36. package/src/types/parsed-gir.ts +2 -2
  37. package/src/types/parsed-package-data.ts +4 -4
  38. package/src/types/property-case.ts +1 -1
  39. package/src/types/resolve-type.ts +2 -2
  40. package/src/types/template-data.ts +5 -5
  41. package/src/types/template-options.ts +1 -1
  42. package/src/types/transformation-case.ts +8 -8
  43. package/src/types/transformations.ts +2 -2
  44. package/src/types/ts-doc-tag.ts +12 -12
  45. package/src/types/ts-doc.ts +9 -9
  46. package/src/types/type-gir-alias.ts +1 -1
  47. package/src/types/type-gir-class.ts +1 -1
  48. package/src/types/type-gir-element.ts +21 -21
  49. package/src/types/type-gir-enumeration-member.ts +1 -1
  50. package/src/types/type-gir-enumeration.ts +1 -1
  51. package/src/types/type-gir-function.ts +7 -7
  52. package/src/types/type-gir-interface.ts +1 -1
  53. package/src/types/type-gir-method.ts +1 -1
  54. package/src/types/type-gir-parameter.ts +1 -1
  55. package/src/types/type-gir-property.ts +1 -1
  56. package/src/types/type-gir-variable.ts +1 -1
  57. package/src/types/type-ts-element.ts +10 -10
  58. package/src/types/type-ts-enumeration-member.ts +1 -1
  59. package/src/types/type-ts-function.ts +1 -1
  60. package/src/types/type-ts-property.ts +1 -1
  61. package/src/types/user-config-load-result.ts +4 -4
  62. package/src/types/user-config.ts +53 -53
@@ -6,18 +6,18 @@
6
6
  * Inspirited from https://github.com/TypeStrong/typedoc/blob/master/src/lib/models/comments/tag.ts
7
7
  */
8
8
  export interface TsDocTag {
9
- /**
10
- * The name of this tag.
11
- */
12
- tagName: string
9
+ /**
10
+ * The name of this tag.
11
+ */
12
+ tagName: string;
13
13
 
14
- /**
15
- * The name of the related parameter when this is a ```@param``` tag.
16
- */
17
- paramName: string
14
+ /**
15
+ * The name of the related parameter when this is a ```@param``` tag.
16
+ */
17
+ paramName: string;
18
18
 
19
- /**
20
- * The actual body text of this tag.
21
- */
22
- text: string
19
+ /**
20
+ * The actual body text of this tag.
21
+ */
22
+ text: string;
23
23
  }
@@ -1,4 +1,4 @@
1
- import type { TsDocTag } from './ts-doc-tag.ts'
1
+ import type { TsDocTag } from "./ts-doc-tag.ts";
2
2
 
3
3
  /**
4
4
  * A model that represents a comment.
@@ -6,13 +6,13 @@ import type { TsDocTag } from './ts-doc-tag.ts'
6
6
  * Inspirited from https://github.com/TypeStrong/typedoc/blob/master/src/lib/models/comments/comment.ts
7
7
  */
8
8
  export interface TsDoc {
9
- /**
10
- * The full body text of the comment..
11
- */
12
- text: string
9
+ /**
10
+ * The full body text of the comment..
11
+ */
12
+ text: string;
13
13
 
14
- /**
15
- * All associated tags.
16
- */
17
- tags: TsDocTag[]
14
+ /**
15
+ * All associated tags.
16
+ */
17
+ tags: TsDocTag[];
18
18
  }
@@ -1,2 +1,2 @@
1
1
  /** All gir elements which can be a typescript `type` */
2
- export type TypeGirAlias = 'alias'
2
+ export type TypeGirAlias = "alias";
@@ -1,2 +1,2 @@
1
1
  /** All gir elements which can be a typescript class */
2
- export type TypeGirClass = 'class' | 'record' | 'interface' | 'union'
2
+ export type TypeGirClass = "class" | "record" | "interface" | "union";
@@ -1,25 +1,25 @@
1
1
  import type {
2
- TypeGirClass,
3
- TypeGirMethod,
4
- TypeGirVariable,
5
- TypeGirAlias,
6
- TypeGirEnumeration,
7
- TypeGirEnumerationMember,
8
- TypeGirInterface,
9
- TypeGirParameter,
10
- TypeGirProperty,
11
- TypeGirFunction,
12
- } from './index.ts'
2
+ TypeGirAlias,
3
+ TypeGirClass,
4
+ TypeGirEnumeration,
5
+ TypeGirEnumerationMember,
6
+ TypeGirFunction,
7
+ TypeGirInterface,
8
+ TypeGirMethod,
9
+ TypeGirParameter,
10
+ TypeGirProperty,
11
+ TypeGirVariable,
12
+ } from "./index.ts";
13
13
 
14
14
  /** Any gir element type */
15
15
  export type TypeGirElement =
16
- | TypeGirClass
17
- | TypeGirMethod
18
- | TypeGirVariable
19
- | TypeGirAlias
20
- | TypeGirEnumeration
21
- | TypeGirEnumerationMember
22
- | TypeGirInterface
23
- | TypeGirParameter
24
- | TypeGirProperty
25
- | TypeGirFunction
16
+ | TypeGirClass
17
+ | TypeGirMethod
18
+ | TypeGirVariable
19
+ | TypeGirAlias
20
+ | TypeGirEnumeration
21
+ | TypeGirEnumerationMember
22
+ | TypeGirInterface
23
+ | TypeGirParameter
24
+ | TypeGirProperty
25
+ | TypeGirFunction;
@@ -1,2 +1,2 @@
1
1
  /** All gir elements which can be a typescript enumeration */
2
- export type TypeGirEnumerationMember = 'enum-member' | 'bitfield-member'
2
+ export type TypeGirEnumerationMember = "enum-member" | "bitfield-member";
@@ -1,2 +1,2 @@
1
1
  /** All gir elements which can be a typescript enumeration */
2
- export type TypeGirEnumeration = 'enum' | 'bitfield'
2
+ export type TypeGirEnumeration = "enum" | "bitfield";
@@ -1,8 +1,8 @@
1
1
  export type TypeGirFunction =
2
- | 'constructor'
3
- | 'function'
4
- | 'method'
5
- | 'static-function'
6
- | 'signal'
7
- | 'virtual'
8
- | 'callback'
2
+ | "constructor"
3
+ | "function"
4
+ | "method"
5
+ | "static-function"
6
+ | "signal"
7
+ | "virtual"
8
+ | "callback";
@@ -1,2 +1,2 @@
1
1
  /** All gir elements which can be a typescript interface */
2
- export type TypeGirInterface = 'callback'
2
+ export type TypeGirInterface = "callback";
@@ -1,2 +1,2 @@
1
1
  /** All gir elements which can be a typescript method (or static function) of a class */
2
- export type TypeGirMethod = 'virtual' | 'signal' | 'method' | 'constructor' | 'function' | 'static'
2
+ export type TypeGirMethod = "virtual" | "signal" | "method" | "constructor" | "function" | "static";
@@ -1 +1 @@
1
- export type TypeGirParameter = 'callable-param'
1
+ export type TypeGirParameter = "callable-param";
@@ -1,2 +1,2 @@
1
1
  /** All gir elements which can be a typescript field / property */
2
- export type TypeGirProperty = 'property' | 'field' | 'constant'
2
+ export type TypeGirProperty = "property" | "field" | "constant";
@@ -1 +1 @@
1
- export type TypeGirVariable = 'constant'
1
+ export type TypeGirVariable = "constant";
@@ -1,13 +1,13 @@
1
- import type { TypeTsFunction, TypeTsProperty } from './index.ts'
1
+ import type { TypeTsFunction, TypeTsProperty } from "./index.ts";
2
2
 
3
3
  /** Any typescript element type */
4
4
  export type TypeTsElement =
5
- | 'class'
6
- | 'interface'
7
- | 'enum'
8
- | 'enum-member'
9
- | 'constant'
10
- | 'event-methods'
11
- | 'type'
12
- | TypeTsFunction
13
- | TypeTsProperty
5
+ | "class"
6
+ | "interface"
7
+ | "enum"
8
+ | "enum-member"
9
+ | "constant"
10
+ | "event-methods"
11
+ | "type"
12
+ | TypeTsFunction
13
+ | TypeTsProperty;
@@ -1,2 +1,2 @@
1
1
  /** All gir elements which can be a typescript enumeration */
2
- export type TypeTsEnumerationMember = 'enum-member'
2
+ export type TypeTsEnumerationMember = "enum-member";
@@ -1 +1 @@
1
- export type TypeTsFunction = 'static-function' | 'constructor' | 'function' | 'method' | 'event-methods' | 'interface'
1
+ export type TypeTsFunction = "static-function" | "constructor" | "function" | "method" | "event-methods" | "interface";
@@ -1 +1 @@
1
- export type TypeTsProperty = 'static-property' | 'property' | 'constructor-property'
1
+ export type TypeTsProperty = "static-property" | "property" | "constructor-property";
@@ -1,6 +1,6 @@
1
- import type { UserConfig } from './user-config.ts'
1
+ import type { UserConfig } from "./user-config.ts";
2
2
  export interface UserConfigLoadResult {
3
- config: Partial<UserConfig>
4
- filepath: string
5
- isEmpty?: boolean | undefined
3
+ config: Partial<UserConfig>;
4
+ filepath: string;
5
+ isEmpty?: boolean | undefined;
6
6
  }
@@ -2,57 +2,57 @@
2
2
  * Types for config file
3
3
  */
4
4
  export interface UserConfig {
5
- /** root / working directory of your project */
6
- root: string
7
- /** directory to output to */
8
- outdir: string | null
9
- /** GIR directories */
10
- girDirectories: string[]
11
- /** Switch on/off the verbose mode */
12
- verbose: boolean
13
- /** Do not ask for package versions if multiple versions are found */
14
- ignoreVersionConflicts: boolean
15
- /** print the output to console and create no files */
16
- print: boolean
17
- /** GIR modules to load, e.g. 'Gio-2.0'. Accepts multiple modules */
18
- modules: string[]
19
- /** modules that should be ignored */
20
- ignore?: string[]
21
- /** Do not export all symbols for each module as a namespace */
22
- noNamespace: boolean
23
- /** Do not generate documentation comments */
24
- noComments: boolean
25
- /** Generate promisified functions for async/finish calls */
26
- promisify: boolean
27
- /** Scope of the generated NPM packages */
28
- npmScope: string
29
- /** Uses the workspace protocol for the generated packages which can be used with package managers like Yarn and PNPM */
30
- workspace: boolean
31
- /**
32
- * Only use the version prefix for the ambient module exports.
33
- * This is useful if, for whatever reason, you want to use different library versions of the same library in your project.
34
- *
35
- * @example
36
- * ```ts
37
- * declare module 'gi://Gtk?version=4.0' {...}
38
- * declare module 'gi://Gtk?version=3.0' {...}
39
- * ```
40
- */
41
- onlyVersionPrefix: boolean
42
- /** Do not prettify the generated types */
43
- noPrettyPrint: boolean
44
- /** Disable GLib.Variant class with string parsing */
45
- noAdvancedVariants: boolean
46
- /**
47
- * Generate the typescript types with package.json support
48
- */
49
- package: boolean
50
- /**
51
- * Enable generation problem reporter and create a detailed report file
52
- */
53
- reporter: boolean
54
- /**
55
- * Output file path for the reporter
56
- */
57
- reporterOutput: string
5
+ /** root / working directory of your project */
6
+ root: string;
7
+ /** directory to output to */
8
+ outdir: string | null;
9
+ /** GIR directories */
10
+ girDirectories: string[];
11
+ /** Switch on/off the verbose mode */
12
+ verbose: boolean;
13
+ /** Do not ask for package versions if multiple versions are found */
14
+ ignoreVersionConflicts: boolean;
15
+ /** print the output to console and create no files */
16
+ print: boolean;
17
+ /** GIR modules to load, e.g. 'Gio-2.0'. Accepts multiple modules */
18
+ modules: string[];
19
+ /** modules that should be ignored */
20
+ ignore?: string[];
21
+ /** Do not export all symbols for each module as a namespace */
22
+ noNamespace: boolean;
23
+ /** Do not generate documentation comments */
24
+ noComments: boolean;
25
+ /** Generate promisified functions for async/finish calls */
26
+ promisify: boolean;
27
+ /** Scope of the generated NPM packages */
28
+ npmScope: string;
29
+ /** Uses the workspace protocol for the generated packages which can be used with package managers like Yarn and PNPM */
30
+ workspace: boolean;
31
+ /**
32
+ * Only use the version prefix for the ambient module exports.
33
+ * This is useful if, for whatever reason, you want to use different library versions of the same library in your project.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * declare module 'gi://Gtk?version=4.0' {...}
38
+ * declare module 'gi://Gtk?version=3.0' {...}
39
+ * ```
40
+ */
41
+ onlyVersionPrefix: boolean;
42
+ /** Do not prettify the generated types */
43
+ noPrettyPrint: boolean;
44
+ /** Disable GLib.Variant class with string parsing */
45
+ noAdvancedVariants: boolean;
46
+ /**
47
+ * Generate the typescript types with package.json support
48
+ */
49
+ package: boolean;
50
+ /**
51
+ * Enable generation problem reporter and create a detailed report file
52
+ */
53
+ reporter: boolean;
54
+ /**
55
+ * Output file path for the reporter
56
+ */
57
+ reporterOutput: string;
58
58
  }