@tslite/checker 1.12.0 → 1.13.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.
Files changed (2) hide show
  1. package/dist/checker.js +7 -7
  2. package/package.json +6 -6
package/dist/checker.js CHANGED
@@ -9725,9 +9725,9 @@ export function createTypeChecker(host) {
9725
9725
  if (result) {
9726
9726
  result &= signaturesRelatedTo(source, target, reportStructuralErrors);
9727
9727
  if (result) {
9728
- result &= indexTypesRelatedTo(source, target, 0 /* IndexKind.String */, sourceIsPrimitive, reportStructuralErrors, intersectionState);
9728
+ result &= indexTypesRelatedTo(source, target, 0 /* IndexKind.String */, reportStructuralErrors, intersectionState);
9729
9729
  if (result) {
9730
- result &= indexTypesRelatedTo(source, target, 1 /* IndexKind.Number */, sourceIsPrimitive, reportStructuralErrors, intersectionState);
9730
+ result &= indexTypesRelatedTo(source, target, 1 /* IndexKind.Number */, reportStructuralErrors, intersectionState);
9731
9731
  }
9732
9732
  }
9733
9733
  }
@@ -9874,9 +9874,9 @@ export function createTypeChecker(host) {
9874
9874
  if (result) {
9875
9875
  result &= signaturesRelatedTo(source, type, /*reportStructuralErrors*/ false);
9876
9876
  if (result) {
9877
- result &= indexTypesRelatedTo(source, type, 0 /* IndexKind.String */, /*sourceIsPrimitive*/ false, /*reportStructuralErrors*/ false, 0 /* IntersectionState.None */);
9877
+ result &= indexTypesRelatedTo(source, type, 0 /* IndexKind.String */, /*reportStructuralErrors*/ false, 0 /* IntersectionState.None */);
9878
9878
  if (result) {
9879
- result &= indexTypesRelatedTo(source, type, 1 /* IndexKind.Number */, /*sourceIsPrimitive*/ false, /*reportStructuralErrors*/ false, 0 /* IntersectionState.None */);
9879
+ result &= indexTypesRelatedTo(source, type, 1 /* IndexKind.Number */, /*reportStructuralErrors*/ false, 0 /* IntersectionState.None */);
9880
9880
  }
9881
9881
  }
9882
9882
  }
@@ -10189,13 +10189,13 @@ export function createTypeChecker(host) {
10189
10189
  }
10190
10190
  return related;
10191
10191
  }
10192
- function indexTypesRelatedTo(source, target, kind, sourceIsPrimitive, reportErrors, intersectionState) {
10192
+ function indexTypesRelatedTo(source, target, kind, reportErrors, intersectionState) {
10193
10193
  if (relation === identityRelation) {
10194
10194
  return indexTypesIdenticalTo(source, target, kind);
10195
10195
  }
10196
10196
  const targetType = getIndexTypeOfType(target, kind);
10197
- if (!targetType || targetType.flags & 1 /* TypeFlags.Any */ && !sourceIsPrimitive) {
10198
- // A index signature `any` aceita tudo, menos primitivo.
10197
+ if (!targetType) {
10198
+ // Sem index signature no alvo, não há o que relacionar. A de `any` se relaciona como as outras (CK-75).
10199
10199
  return -1 /* Ternary.True */;
10200
10200
  }
10201
10201
  if (isGenericMappedType(source)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tslite/checker",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "The tsc 3.9.10 checker, copied from the tag and cut down to the TSLite Language, with the adapter contract (check) and the conformance against the oracle",
5
5
  "author": "Anderson D. Rosa <andersondrosa@outlook.com>",
6
6
  "license": "Apache-2.0",
@@ -22,13 +22,13 @@
22
22
  "NOTICE"
23
23
  ],
24
24
  "dependencies": {
25
- "@tslite/parser": "1.12.0",
26
- "@tslite/printer": "1.12.0",
27
- "@tslite/binder": "1.12.0"
25
+ "@tslite/binder": "1.13.0",
26
+ "@tslite/parser": "1.13.0",
27
+ "@tslite/printer": "1.13.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@tslite/fuzz": "0.1.0",
31
- "@tslite/oracle": "0.1.1"
30
+ "@tslite/oracle": "0.1.1",
31
+ "@tslite/fuzz": "0.1.0"
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",