@typescript-eslint/type-utils 8.36.1-alpha.3 → 8.37.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"typeDeclaredInPackageDeclarationFile.d.ts","sourceRoot":"","sources":["../../src/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AA8CjC,wBAAgB,oCAAoC,CAClD,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,EAAE,CAAC,IAAI,EAAE,EACvB,gBAAgB,EAAE,EAAE,CAAC,UAAU,EAAE,EACjC,OAAO,EAAE,EAAE,CAAC,OAAO,GAClB,OAAO,CAKT"}
1
+ {"version":3,"file":"typeDeclaredInPackageDeclarationFile.d.ts","sourceRoot":"","sources":["../../src/typeOrValueSpecifiers/typeDeclaredInPackageDeclarationFile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAiDjC,wBAAgB,oCAAoC,CAClD,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,EAAE,CAAC,IAAI,EAAE,EACvB,gBAAgB,EAAE,EAAE,CAAC,UAAU,EAAE,EACjC,OAAO,EAAE,EAAE,CAAC,OAAO,GAClB,OAAO,CAKT"}
@@ -38,14 +38,17 @@ const ts = __importStar(require("typescript"));
38
38
  function findParentModuleDeclaration(node) {
39
39
  switch (node.kind) {
40
40
  case ts.SyntaxKind.ModuleDeclaration:
41
+ // "namespace x {...}" should be ignored here
42
+ if (node.flags & ts.NodeFlags.Namespace) {
43
+ break;
44
+ }
41
45
  return ts.isStringLiteral(node.name)
42
46
  ? node
43
47
  : undefined;
44
48
  case ts.SyntaxKind.SourceFile:
45
49
  return undefined;
46
- default:
47
- return findParentModuleDeclaration(node.parent);
48
50
  }
51
+ return findParentModuleDeclaration(node.parent);
49
52
  }
50
53
  function typeDeclaredInDeclareModule(packageName, declarations) {
51
54
  return declarations.some(declaration => findParentModuleDeclaration(declaration)?.name.text === packageName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typescript-eslint/type-utils",
3
- "version": "8.36.1-alpha.3",
3
+ "version": "8.37.0",
4
4
  "description": "Type utilities for working with TypeScript + ESLint together",
5
5
  "files": [
6
6
  "dist",
@@ -44,9 +44,9 @@
44
44
  "typecheck": "yarn run -BT nx typecheck"
45
45
  },
46
46
  "dependencies": {
47
- "@typescript-eslint/types": "8.36.1-alpha.3",
48
- "@typescript-eslint/typescript-estree": "8.36.1-alpha.3",
49
- "@typescript-eslint/utils": "8.36.1-alpha.3",
47
+ "@typescript-eslint/types": "8.37.0",
48
+ "@typescript-eslint/typescript-estree": "8.37.0",
49
+ "@typescript-eslint/utils": "8.37.0",
50
50
  "debug": "^4.3.4",
51
51
  "ts-api-utils": "^2.1.0"
52
52
  },
@@ -55,7 +55,7 @@
55
55
  "typescript": ">=4.8.4 <5.9.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@typescript-eslint/parser": "8.36.1-alpha.3",
58
+ "@typescript-eslint/parser": "8.37.0",
59
59
  "@vitest/coverage-v8": "^3.1.3",
60
60
  "ajv": "^6.12.6",
61
61
  "eslint": "*",