tstyche 7.0.0-beta.5 → 7.0.0-rc.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.
package/dist/api.js CHANGED
@@ -4414,8 +4414,8 @@ class ExpectDiagnosticText {
4414
4414
  static argumentMustBe(argumentNameText, expectedText) {
4415
4415
  return `An argument for '${argumentNameText}' must be ${expectedText}.`;
4416
4416
  }
4417
- static typeArgumentMustBe(argumentNameText, expectedText) {
4418
- return `A type argument for '${argumentNameText}' must be ${expectedText}.`;
4417
+ static typeArgumentMustBe(expectedText) {
4418
+ return `The type argument must be ${expectedText}.`;
4419
4419
  }
4420
4420
  static isCallable(isExpression, targetText) {
4421
4421
  return `${isExpression ? "Expression" : "Type"} is callable ${targetText}.`;
@@ -4728,7 +4728,7 @@ class ToAcceptProps {
4728
4728
  const expectedText = "of a function or class type";
4729
4729
  const text = nodeBelongsToArgumentList(this.#compiler, sourceNode)
4730
4730
  ? ExpectDiagnosticText.argumentMustBe("source", expectedText)
4731
- : ExpectDiagnosticText.typeArgumentMustBe("Source", expectedText);
4731
+ : ExpectDiagnosticText.typeArgumentMustBe(expectedText);
4732
4732
  const origin = DiagnosticOrigin.fromNode(sourceNode);
4733
4733
  diagnostics.push(Diagnostic.error(text, origin));
4734
4734
  }
@@ -5349,7 +5349,7 @@ class ToBeApplicable {
5349
5349
  const expectedText = "of a function type";
5350
5350
  const text = nodeBelongsToArgumentList(this.#compiler, sourceNode)
5351
5351
  ? ExpectDiagnosticText.argumentMustBe("source", expectedText)
5352
- : ExpectDiagnosticText.typeArgumentMustBe("Source", expectedText);
5352
+ : ExpectDiagnosticText.typeArgumentMustBe(expectedText);
5353
5353
  const origin = DiagnosticOrigin.fromNode(sourceNode);
5354
5354
  onDiagnostics([Diagnostic.error(text, origin)]);
5355
5355
  return;
@@ -5443,7 +5443,7 @@ class ToBeCallableWith extends AbilityMatcherBase {
5443
5443
  text.push(ExpectDiagnosticText.argumentMustBe("source", "a callable expression"));
5444
5444
  }
5445
5445
  else {
5446
- text.push(ExpectDiagnosticText.typeArgumentMustBe("Source", "a callable type"));
5446
+ text.push(ExpectDiagnosticText.typeArgumentMustBe("a callable type"));
5447
5447
  }
5448
5448
  if (sourceType.getConstructSignatures().length > 0) {
5449
5449
  text.push(ExpectDiagnosticText.didYouMeanToUse("the '.toBeConstructableWith()' matcher"));
@@ -5470,7 +5470,7 @@ class ToBeConstructableWith extends AbilityMatcherBase {
5470
5470
  text.push(ExpectDiagnosticText.argumentMustBe("source", "a constructable expression"));
5471
5471
  }
5472
5472
  else {
5473
- text.push(ExpectDiagnosticText.typeArgumentMustBe("Source", "a constructable type"));
5473
+ text.push(ExpectDiagnosticText.typeArgumentMustBe("a constructable type"));
5474
5474
  }
5475
5475
  if (sourceType.getCallSignatures().length > 0) {
5476
5476
  text.push(ExpectDiagnosticText.didYouMeanToUse("the '.toBeCallableWith()' matcher"));
@@ -5498,14 +5498,14 @@ class ToBeInstantiableWith extends AbilityMatcherBase {
5498
5498
  text = ExpectDiagnosticText.argumentMustBe("source", "an instantiable expression");
5499
5499
  }
5500
5500
  else {
5501
- text = ExpectDiagnosticText.typeArgumentMustBe("Source", "an instantiable type");
5501
+ text = ExpectDiagnosticText.typeArgumentMustBe("an instantiable type");
5502
5502
  }
5503
5503
  const origin = DiagnosticOrigin.fromNode(sourceNode);
5504
5504
  onDiagnostics([Diagnostic.error(text, origin)]);
5505
5505
  return;
5506
5506
  }
5507
5507
  if (!this.compiler.isTupleTypeNode(targetNode)) {
5508
- const text = ExpectDiagnosticText.typeArgumentMustBe("Target", "a tuple type");
5508
+ const text = ExpectDiagnosticText.typeArgumentMustBe("a tuple type");
5509
5509
  const origin = DiagnosticOrigin.fromNode(targetNode);
5510
5510
  onDiagnostics([Diagnostic.error(text, origin)]);
5511
5511
  return;
@@ -5545,7 +5545,7 @@ class ToHaveProperty {
5545
5545
  const expectedText = "of an object type";
5546
5546
  const text = nodeBelongsToArgumentList(this.#compiler, sourceNode)
5547
5547
  ? ExpectDiagnosticText.argumentMustBe("source", expectedText)
5548
- : ExpectDiagnosticText.typeArgumentMustBe("Source", expectedText);
5548
+ : ExpectDiagnosticText.typeArgumentMustBe(expectedText);
5549
5549
  const origin = DiagnosticOrigin.fromNode(sourceNode);
5550
5550
  diagnostics.push(Diagnostic.error(text, origin));
5551
5551
  }
@@ -6165,7 +6165,7 @@ class FileRunner {
6165
6165
  class Runner {
6166
6166
  #eventEmitter = new EventEmitter();
6167
6167
  #resolvedConfig;
6168
- static version = "7.0.0-beta.5";
6168
+ static version = "7.0.0-rc.0";
6169
6169
  constructor(resolvedConfig) {
6170
6170
  this.#resolvedConfig = resolvedConfig;
6171
6171
  }
package/dist/index.d.cts CHANGED
@@ -37,7 +37,7 @@ interface Matchers {
37
37
  /**
38
38
  * Checks if the type is the same as the given type.
39
39
  */
40
- <Target>(): void;
40
+ <T>(): void;
41
41
  /**
42
42
  * Checks if the type is the same as type of the given expression.
43
43
  */
@@ -50,7 +50,7 @@ interface Matchers {
50
50
  /**
51
51
  * Checks if the type is assignable from the given type.
52
52
  */
53
- <Target>(): void;
53
+ <T>(): void;
54
54
  /**
55
55
  * Checks if the type is assignable from type of the given expression.
56
56
  */
@@ -63,7 +63,7 @@ interface Matchers {
63
63
  /**
64
64
  * Checks if the type is assignable to the given type.
65
65
  */
66
- <Target>(): void;
66
+ <T>(): void;
67
67
  /**
68
68
  * Checks if the type is assignable to type of the given expression.
69
69
  */
@@ -90,7 +90,7 @@ interface Matchers {
90
90
  /**
91
91
  * Checks if the generic is instantiable with the given type arguments.
92
92
  */
93
- toBeInstantiableWith: <Target extends [...args: Array<unknown>]>() => void;
93
+ toBeInstantiableWith: <T extends [...args: Array<unknown>]>() => void;
94
94
  /**
95
95
  * Checks if the type has the given property.
96
96
  */
@@ -118,14 +118,10 @@ interface Modifier {
118
118
  interface Expect {
119
119
  /**
120
120
  * Builds an assertion.
121
- *
122
- * @template Source - The type which is checked.
123
121
  */
124
- <Source>(): Modifier;
122
+ <S>(): Modifier;
125
123
  /**
126
124
  * Builds an assertion.
127
- *
128
- * @param source - The expression whose type is checked.
129
125
  */
130
126
  (source: unknown): Modifier;
131
127
  /**
@@ -134,14 +130,10 @@ interface Expect {
134
130
  only: {
135
131
  /**
136
132
  * Marks an assertion as focused.
137
- *
138
- * @template Source - The type which is checked.
139
133
  */
140
- <Source>(): Modifier;
134
+ <S>(): Modifier;
141
135
  /**
142
136
  * Marks an assertion as focused.
143
- *
144
- * @param source - The expression whose type is checked.
145
137
  */
146
138
  (source: unknown): Modifier;
147
139
  };
@@ -151,14 +143,10 @@ interface Expect {
151
143
  skip: {
152
144
  /**
153
145
  * Marks an assertion as skipped.
154
- *
155
- * @template Source - The type which is checked.
156
146
  */
157
- <Source>(): Modifier;
147
+ <S>(): Modifier;
158
148
  /**
159
149
  * Marks an assertion as skipped.
160
- *
161
- * @param source - The expression whose type is checked.
162
150
  */
163
151
  (source: unknown): Modifier;
164
152
  };
@@ -204,14 +192,10 @@ interface Actions {
204
192
  interface When {
205
193
  /**
206
194
  * Creates a test plan.
207
- *
208
- * @template Target - The type upon which an action is performed.
209
195
  */
210
- <Target>(): Actions;
196
+ <T>(): Actions;
211
197
  /**
212
198
  * Creates a test plan.
213
- *
214
- * @param target - The expression upon which an action is performed.
215
199
  */
216
200
  (target: unknown): Actions;
217
201
  }
package/dist/index.d.ts CHANGED
@@ -37,7 +37,7 @@ interface Matchers {
37
37
  /**
38
38
  * Checks if the type is the same as the given type.
39
39
  */
40
- <Target>(): void;
40
+ <T>(): void;
41
41
  /**
42
42
  * Checks if the type is the same as type of the given expression.
43
43
  */
@@ -50,7 +50,7 @@ interface Matchers {
50
50
  /**
51
51
  * Checks if the type is assignable from the given type.
52
52
  */
53
- <Target>(): void;
53
+ <T>(): void;
54
54
  /**
55
55
  * Checks if the type is assignable from type of the given expression.
56
56
  */
@@ -63,7 +63,7 @@ interface Matchers {
63
63
  /**
64
64
  * Checks if the type is assignable to the given type.
65
65
  */
66
- <Target>(): void;
66
+ <T>(): void;
67
67
  /**
68
68
  * Checks if the type is assignable to type of the given expression.
69
69
  */
@@ -90,7 +90,7 @@ interface Matchers {
90
90
  /**
91
91
  * Checks if the generic is instantiable with the given type arguments.
92
92
  */
93
- toBeInstantiableWith: <Target extends [...args: Array<unknown>]>() => void;
93
+ toBeInstantiableWith: <T extends [...args: Array<unknown>]>() => void;
94
94
  /**
95
95
  * Checks if the type has the given property.
96
96
  */
@@ -118,14 +118,10 @@ interface Modifier {
118
118
  interface Expect {
119
119
  /**
120
120
  * Builds an assertion.
121
- *
122
- * @template Source - The type which is checked.
123
121
  */
124
- <Source>(): Modifier;
122
+ <S>(): Modifier;
125
123
  /**
126
124
  * Builds an assertion.
127
- *
128
- * @param source - The expression whose type is checked.
129
125
  */
130
126
  (source: unknown): Modifier;
131
127
  /**
@@ -134,14 +130,10 @@ interface Expect {
134
130
  only: {
135
131
  /**
136
132
  * Marks an assertion as focused.
137
- *
138
- * @template Source - The type which is checked.
139
133
  */
140
- <Source>(): Modifier;
134
+ <S>(): Modifier;
141
135
  /**
142
136
  * Marks an assertion as focused.
143
- *
144
- * @param source - The expression whose type is checked.
145
137
  */
146
138
  (source: unknown): Modifier;
147
139
  };
@@ -151,14 +143,10 @@ interface Expect {
151
143
  skip: {
152
144
  /**
153
145
  * Marks an assertion as skipped.
154
- *
155
- * @template Source - The type which is checked.
156
146
  */
157
- <Source>(): Modifier;
147
+ <S>(): Modifier;
158
148
  /**
159
149
  * Marks an assertion as skipped.
160
- *
161
- * @param source - The expression whose type is checked.
162
150
  */
163
151
  (source: unknown): Modifier;
164
152
  };
@@ -204,14 +192,10 @@ interface Actions {
204
192
  interface When {
205
193
  /**
206
194
  * Creates a test plan.
207
- *
208
- * @template Target - The type upon which an action is performed.
209
195
  */
210
- <Target>(): Actions;
196
+ <T>(): Actions;
211
197
  /**
212
198
  * Creates a test plan.
213
- *
214
- * @param target - The expression upon which an action is performed.
215
199
  */
216
200
  (target: unknown): Actions;
217
201
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tstyche",
3
- "version": "7.0.0-beta.5",
3
+ "version": "7.0.0-rc.0",
4
4
  "description": "Everything You Need for Type Testing.",
5
5
  "keywords": [
6
6
  "typescript",