tstyche 7.0.0-rc.0 → 7.0.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 (3) hide show
  1. package/README.md +2 -2
  2. package/dist/api.js +20 -16
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -105,7 +105,7 @@ Visit [tstyche.org](https://tstyche.org) to view the full documentation.
105
105
  [license-url]: https://github.com/tstyche/tstyche/blob/main/LICENSE.md
106
106
  [install-size-badge]: https://badgen.net/packagephobia/install/tstyche
107
107
  [install-size-url]: https://packagephobia.com/result?p=tstyche
108
- [coverage-badge]: https://badgen.net/codacy/coverage/a581ca5c323a455886b7bdd9623c4ec8
109
- [coverage-url]: https://app.codacy.com/gh/tstyche/tstyche/coverage/dashboard
108
+ [coverage-badge]: https://badgen.net/codecov/github/tstyche/tstyche
109
+ [coverage-url]: https://app.codecov.io/gh/tstyche/tstyche
110
110
  [starter-badge]: https://developer.stackblitz.com/img/open_in_stackblitz.svg
111
111
  [starter-url]: https://tstyche.org/new
package/dist/api.js CHANGED
@@ -3962,8 +3962,10 @@ class CollectService {
3962
3962
  }
3963
3963
  const matcherNode = this.#getMatcherNode(matcherNameNode);
3964
3964
  if (!matcherNode) {
3965
- const text = "The matcher must be called with an argument.";
3966
- const origin = DiagnosticOrigin.fromNode(matcherNameNode);
3965
+ const text = "The matcher must be completed with '()'.";
3966
+ const origin = new DiagnosticOrigin(matcherNameNode.name.getStart(), this.#compiler.isExpressionWithTypeArguments(matcherNameNode.parent)
3967
+ ? matcherNameNode.parent.getEnd()
3968
+ : matcherNameNode.getEnd(), matcherNameNode.getSourceFile());
3967
3969
  this.#onDiagnostics(Diagnostic.error(text, origin));
3968
3970
  return;
3969
3971
  }
@@ -4180,7 +4182,6 @@ class ProjectService {
4180
4182
  noUncheckedIndexedAccess: true,
4181
4183
  resolveJsonModule: true,
4182
4184
  strict: true,
4183
- verbatimModuleSyntax: true,
4184
4185
  target: this.#compiler.ScriptTarget.ESNext,
4185
4186
  };
4186
4187
  if (Version.isSatisfiedWith(this.#compiler.version, "5.6")) {
@@ -5144,18 +5145,20 @@ class Structure {
5144
5145
  if (aSignatures.length !== bSignatures.length) {
5145
5146
  return false;
5146
5147
  }
5147
- for (let i = 0; i < aSignatures.length; i++) {
5148
- if (aSignatures[i].isReadonly !== bSignatures[i].isReadonly) {
5149
- return false;
5150
- }
5151
- if (!this.compare(aSignatures[i].keyType, bSignatures[i].keyType)) {
5152
- return false;
5153
- }
5154
- if (!this.compare(aSignatures[i].type, bSignatures[i].type)) {
5155
- return false;
5156
- }
5157
- }
5158
- return true;
5148
+ return aSignatures.every((aSignature) => {
5149
+ return bSignatures.some((bSignature) => {
5150
+ if (aSignature.isReadonly !== bSignature.isReadonly) {
5151
+ return false;
5152
+ }
5153
+ if (!this.compare(aSignature.keyType, bSignature.keyType)) {
5154
+ return false;
5155
+ }
5156
+ if (!this.compare(aSignature.type, bSignature.type)) {
5157
+ return false;
5158
+ }
5159
+ return true;
5160
+ });
5161
+ });
5159
5162
  }
5160
5163
  compareTypeParameters(a, b) {
5161
5164
  if (getTypeParameterModifiers(a, this.#compiler) !== getTypeParameterModifiers(b, this.#compiler)) {
@@ -5491,6 +5494,7 @@ class ToBeInstantiableWith extends AbilityMatcherBase {
5491
5494
  explainNotText = ExpectDiagnosticText.isNotInstantiable;
5492
5495
  match(matchWorker, sourceNode, targetNode, onDiagnostics) {
5493
5496
  if (!(this.compiler.isIdentifier(sourceNode) ||
5497
+ this.compiler.isPropertyAccessExpression(sourceNode) ||
5494
5498
  this.compiler.isTypeReferenceNode(sourceNode) ||
5495
5499
  this.compiler.isExpressionWithTypeArguments(sourceNode))) {
5496
5500
  let text;
@@ -6165,7 +6169,7 @@ class FileRunner {
6165
6169
  class Runner {
6166
6170
  #eventEmitter = new EventEmitter();
6167
6171
  #resolvedConfig;
6168
- static version = "7.0.0-rc.0";
6172
+ static version = "7.0.0";
6169
6173
  constructor(resolvedConfig) {
6170
6174
  this.#resolvedConfig = resolvedConfig;
6171
6175
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tstyche",
3
- "version": "7.0.0-rc.0",
3
+ "version": "7.0.0",
4
4
  "description": "Everything You Need for Type Testing.",
5
5
  "keywords": [
6
6
  "typescript",