@ts-for-gir/generator-typescript 4.0.0-beta.38 → 4.0.0-beta.39

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ts-for-gir/generator-typescript",
3
- "version": "4.0.0-beta.38",
3
+ "version": "4.0.0-beta.39",
4
4
  "description": "TypeScript type definition generator for ts-for-gir",
5
5
  "main": "src/index.ts",
6
6
  "module": "src/index.ts",
@@ -32,16 +32,16 @@
32
32
  ],
33
33
  "devDependencies": {
34
34
  "@types/ejs": "^3.1.5",
35
- "@types/node": "^24.5.2",
35
+ "@types/node": "^24.11.0",
36
36
  "@types/xml2js": "^0.4.14",
37
- "typescript": "^5.9.2"
37
+ "typescript": "^5.9.3"
38
38
  },
39
39
  "dependencies": {
40
- "@gi.ts/parser": "^4.0.0-beta.38",
41
- "@ts-for-gir/generator-base": "^4.0.0-beta.38",
42
- "@ts-for-gir/lib": "^4.0.0-beta.38",
43
- "@ts-for-gir/templates": "^4.0.0-beta.38",
44
- "ejs": "^3.1.10",
40
+ "@gi.ts/parser": "^4.0.0-beta.39",
41
+ "@ts-for-gir/generator-base": "^4.0.0-beta.39",
42
+ "@ts-for-gir/lib": "^4.0.0-beta.39",
43
+ "@ts-for-gir/templates": "^4.0.0-beta.39",
44
+ "ejs": "^4.0.1",
45
45
  "xml2js": "^0.6.2"
46
46
  }
47
47
  }
@@ -1134,7 +1134,10 @@ export class ModuleGenerator extends FormatGenerator<string[]> {
1134
1134
  // as the types may not be compatible.
1135
1135
  //
1136
1136
  // TODO: Don't hardcode string index signatures
1137
- if (!girClass.__ts__indexSignature || girClass.__ts__indexSignature.includes("[key: string]: any")) {
1137
+ if (
1138
+ girClass instanceof IntrospectedClass &&
1139
+ (!girClass.__ts__indexSignature || girClass.__ts__indexSignature.includes("[key: string]: any"))
1140
+ ) {
1138
1141
  // _init method
1139
1142
  def.push("_init(...args: any[]): void;\n");
1140
1143
  }