tstyche 7.2.2 → 7.2.3

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/api.js +10 -2
  2. package/package.json +1 -1
package/dist/api.js CHANGED
@@ -612,7 +612,7 @@ class Fetcher {
612
612
  }
613
613
  async get(request, diagnostic, options) {
614
614
  let delay = 3000;
615
- request.headers.set("User-Agent", `tstyche/7.2.2 ${process.platform} ${process.arch}`);
615
+ request.headers.set("User-Agent", `tstyche/7.2.3 ${process.platform} ${process.arch}`);
616
616
  for (let attempt = 0; attempt <= this.#retries; attempt++) {
617
617
  const isLastAttempt = attempt === this.#retries;
618
618
  const suppressErrors = options?.suppressErrors || !isLastAttempt;
@@ -4675,6 +4675,13 @@ function getIndexSignatures(type, compiler, typeChecker) {
4675
4675
  }
4676
4676
  return typeChecker.getIndexInfosOfType(type);
4677
4677
  }
4678
+ function getReducedType(type, typeChecker) {
4679
+ typeChecker.typeToString(type);
4680
+ if ("resolvedReducedType" in type) {
4681
+ return type.resolvedReducedType;
4682
+ }
4683
+ return type;
4684
+ }
4678
4685
  function getSignatures(type, kind, compiler, typeChecker) {
4679
4686
  if (type.flags & compiler.TypeFlags.Intersection) {
4680
4687
  return type.types.flatMap((type) => getSignatures(type, kind, compiler, typeChecker));
@@ -5164,6 +5171,7 @@ class Structure {
5164
5171
  return isSame;
5165
5172
  }
5166
5173
  #normalize(type) {
5174
+ type = getReducedType(type, this.#typeChecker);
5167
5175
  if (type.flags & this.#compiler.TypeFlags.Freshable && type.freshType === type) {
5168
5176
  return type.regularType;
5169
5177
  }
@@ -5901,7 +5909,7 @@ class FileRunner {
5901
5909
  class Runner {
5902
5910
  #eventEmitter = new EventEmitter();
5903
5911
  #resolvedConfig;
5904
- static version = "7.2.2";
5912
+ static version = "7.2.3";
5905
5913
  constructor(resolvedConfig) {
5906
5914
  this.#resolvedConfig = resolvedConfig;
5907
5915
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tstyche",
3
- "version": "7.2.2",
3
+ "version": "7.2.3",
4
4
  "description": "Everything You Need for Type Testing.",
5
5
  "keywords": [
6
6
  "typescript",