tstyche 3.5.0 → 4.0.0-beta.1
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/README.md +3 -3
- package/build/index.d.cts +4 -69
- package/build/index.d.ts +4 -69
- package/build/tstyche.d.ts +70 -80
- package/build/tstyche.js +1074 -991
- package/package.json +12 -15
package/README.md
CHANGED
|
@@ -57,10 +57,10 @@ test("handles numbers", () => {
|
|
|
57
57
|
Here is the list of all matchers:
|
|
58
58
|
|
|
59
59
|
- `.toBe()`, `.toBeAssignableTo()`, `.toBeAssignableWith()` compare types or types of expression,
|
|
60
|
-
- `.toAcceptProps()` checks JSX component props
|
|
60
|
+
- `.toAcceptProps()` checks the type of JSX component props,
|
|
61
|
+
- `.toBeApplicable` ensures that the decorator function can be applied,
|
|
61
62
|
- `.toHaveProperty()` looks up keys on an object type,
|
|
62
|
-
- `.toRaiseError()` captures the
|
|
63
|
-
- `.toBeString()`, `.toBeNumber()`, `.toBeVoid()` and 9 more shorthand checks for primitive types.
|
|
63
|
+
- `.toRaiseError()` captures the message or code of a type error.
|
|
64
64
|
|
|
65
65
|
## Runner
|
|
66
66
|
|
package/build/index.d.cts
CHANGED
|
@@ -97,6 +97,10 @@ interface Matchers {
|
|
|
97
97
|
*/
|
|
98
98
|
(target: unknown): void;
|
|
99
99
|
};
|
|
100
|
+
/**
|
|
101
|
+
* Checks if the decorator function can be applied.
|
|
102
|
+
*/
|
|
103
|
+
toBeApplicable: (target: unknown, context: DecoratorContext) => void;
|
|
100
104
|
/**
|
|
101
105
|
* Checks if the source type is assignable to the target type.
|
|
102
106
|
*/
|
|
@@ -127,80 +131,11 @@ interface Matchers {
|
|
|
127
131
|
* Checks if a property key exists on the source type.
|
|
128
132
|
*/
|
|
129
133
|
toHaveProperty: (key: string | number | symbol) => void;
|
|
130
|
-
/**
|
|
131
|
-
* Checks if the source type matches the target type.
|
|
132
|
-
*
|
|
133
|
-
* @deprecated This matcher will be removed in TSTyche 4. To learn more, visit https://tstyche.org/release-notes/tstyche-3.
|
|
134
|
-
*/
|
|
135
|
-
toMatch: {
|
|
136
|
-
/**
|
|
137
|
-
* Checks if the source type matches the target type.
|
|
138
|
-
*
|
|
139
|
-
* @deprecated This matcher will be removed in TSTyche 4. To learn more, visit https://tstyche.org/release-notes/tstyche-3.
|
|
140
|
-
*/
|
|
141
|
-
<Target>(): void;
|
|
142
|
-
/**
|
|
143
|
-
* Checks if the source type matches type of the target expression.
|
|
144
|
-
*
|
|
145
|
-
* @deprecated This matcher will be removed in TSTyche 4. To learn more, visit https://tstyche.org/release-notes/tstyche-3.
|
|
146
|
-
*/
|
|
147
|
-
(target: unknown): void;
|
|
148
|
-
};
|
|
149
134
|
/**
|
|
150
135
|
* Checks if the source type raises an error.
|
|
151
136
|
*/
|
|
152
137
|
toRaiseError: (...target: Array<string | number | RegExp>) => void;
|
|
153
138
|
}
|
|
154
|
-
interface Matchers {
|
|
155
|
-
/**
|
|
156
|
-
* Checks if the source type is `any`.
|
|
157
|
-
*/
|
|
158
|
-
toBeAny: () => void;
|
|
159
|
-
/**
|
|
160
|
-
* Checks if the source type is `bigint`.
|
|
161
|
-
*/
|
|
162
|
-
toBeBigInt: () => void;
|
|
163
|
-
/**
|
|
164
|
-
* Checks if the source type is `boolean`.
|
|
165
|
-
*/
|
|
166
|
-
toBeBoolean: () => void;
|
|
167
|
-
/**
|
|
168
|
-
* Checks if the source type is `never`.
|
|
169
|
-
*/
|
|
170
|
-
toBeNever: () => void;
|
|
171
|
-
/**
|
|
172
|
-
* Checks if the source type is `null`.
|
|
173
|
-
*/
|
|
174
|
-
toBeNull: () => void;
|
|
175
|
-
/**
|
|
176
|
-
* Checks if the source type is `number`.
|
|
177
|
-
*/
|
|
178
|
-
toBeNumber: () => void;
|
|
179
|
-
/**
|
|
180
|
-
* Checks if the source type is `string`.
|
|
181
|
-
*/
|
|
182
|
-
toBeString: () => void;
|
|
183
|
-
/**
|
|
184
|
-
* Checks if the source type is `symbol`.
|
|
185
|
-
*/
|
|
186
|
-
toBeSymbol: () => void;
|
|
187
|
-
/**
|
|
188
|
-
* Checks if the source type is `undefined`.
|
|
189
|
-
*/
|
|
190
|
-
toBeUndefined: () => void;
|
|
191
|
-
/**
|
|
192
|
-
* Checks if the source type is `unique symbol`.
|
|
193
|
-
*/
|
|
194
|
-
toBeUniqueSymbol: () => void;
|
|
195
|
-
/**
|
|
196
|
-
* Checks if the source type is `unknown`.
|
|
197
|
-
*/
|
|
198
|
-
toBeUnknown: () => void;
|
|
199
|
-
/**
|
|
200
|
-
* Checks if the source type is `void`.
|
|
201
|
-
*/
|
|
202
|
-
toBeVoid: () => void;
|
|
203
|
-
}
|
|
204
139
|
interface Modifier {
|
|
205
140
|
/**
|
|
206
141
|
* Passes the source type to the matcher.
|
package/build/index.d.ts
CHANGED
|
@@ -97,6 +97,10 @@ interface Matchers {
|
|
|
97
97
|
*/
|
|
98
98
|
(target: unknown): void;
|
|
99
99
|
};
|
|
100
|
+
/**
|
|
101
|
+
* Checks if the decorator function can be applied.
|
|
102
|
+
*/
|
|
103
|
+
toBeApplicable: (target: unknown, context: DecoratorContext) => void;
|
|
100
104
|
/**
|
|
101
105
|
* Checks if the source type is assignable to the target type.
|
|
102
106
|
*/
|
|
@@ -127,80 +131,11 @@ interface Matchers {
|
|
|
127
131
|
* Checks if a property key exists on the source type.
|
|
128
132
|
*/
|
|
129
133
|
toHaveProperty: (key: string | number | symbol) => void;
|
|
130
|
-
/**
|
|
131
|
-
* Checks if the source type matches the target type.
|
|
132
|
-
*
|
|
133
|
-
* @deprecated This matcher will be removed in TSTyche 4. To learn more, visit https://tstyche.org/release-notes/tstyche-3.
|
|
134
|
-
*/
|
|
135
|
-
toMatch: {
|
|
136
|
-
/**
|
|
137
|
-
* Checks if the source type matches the target type.
|
|
138
|
-
*
|
|
139
|
-
* @deprecated This matcher will be removed in TSTyche 4. To learn more, visit https://tstyche.org/release-notes/tstyche-3.
|
|
140
|
-
*/
|
|
141
|
-
<Target>(): void;
|
|
142
|
-
/**
|
|
143
|
-
* Checks if the source type matches type of the target expression.
|
|
144
|
-
*
|
|
145
|
-
* @deprecated This matcher will be removed in TSTyche 4. To learn more, visit https://tstyche.org/release-notes/tstyche-3.
|
|
146
|
-
*/
|
|
147
|
-
(target: unknown): void;
|
|
148
|
-
};
|
|
149
134
|
/**
|
|
150
135
|
* Checks if the source type raises an error.
|
|
151
136
|
*/
|
|
152
137
|
toRaiseError: (...target: Array<string | number | RegExp>) => void;
|
|
153
138
|
}
|
|
154
|
-
interface Matchers {
|
|
155
|
-
/**
|
|
156
|
-
* Checks if the source type is `any`.
|
|
157
|
-
*/
|
|
158
|
-
toBeAny: () => void;
|
|
159
|
-
/**
|
|
160
|
-
* Checks if the source type is `bigint`.
|
|
161
|
-
*/
|
|
162
|
-
toBeBigInt: () => void;
|
|
163
|
-
/**
|
|
164
|
-
* Checks if the source type is `boolean`.
|
|
165
|
-
*/
|
|
166
|
-
toBeBoolean: () => void;
|
|
167
|
-
/**
|
|
168
|
-
* Checks if the source type is `never`.
|
|
169
|
-
*/
|
|
170
|
-
toBeNever: () => void;
|
|
171
|
-
/**
|
|
172
|
-
* Checks if the source type is `null`.
|
|
173
|
-
*/
|
|
174
|
-
toBeNull: () => void;
|
|
175
|
-
/**
|
|
176
|
-
* Checks if the source type is `number`.
|
|
177
|
-
*/
|
|
178
|
-
toBeNumber: () => void;
|
|
179
|
-
/**
|
|
180
|
-
* Checks if the source type is `string`.
|
|
181
|
-
*/
|
|
182
|
-
toBeString: () => void;
|
|
183
|
-
/**
|
|
184
|
-
* Checks if the source type is `symbol`.
|
|
185
|
-
*/
|
|
186
|
-
toBeSymbol: () => void;
|
|
187
|
-
/**
|
|
188
|
-
* Checks if the source type is `undefined`.
|
|
189
|
-
*/
|
|
190
|
-
toBeUndefined: () => void;
|
|
191
|
-
/**
|
|
192
|
-
* Checks if the source type is `unique symbol`.
|
|
193
|
-
*/
|
|
194
|
-
toBeUniqueSymbol: () => void;
|
|
195
|
-
/**
|
|
196
|
-
* Checks if the source type is `unknown`.
|
|
197
|
-
*/
|
|
198
|
-
toBeUnknown: () => void;
|
|
199
|
-
/**
|
|
200
|
-
* Checks if the source type is `void`.
|
|
201
|
-
*/
|
|
202
|
-
toBeVoid: () => void;
|
|
203
|
-
}
|
|
204
139
|
interface Modifier {
|
|
205
140
|
/**
|
|
206
141
|
* Passes the source type to the matcher.
|
package/build/tstyche.d.ts
CHANGED
|
@@ -38,17 +38,16 @@ declare class SourceFile {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
declare class DiagnosticOrigin {
|
|
41
|
-
assertion:
|
|
41
|
+
assertion: AssertionNode | undefined;
|
|
42
42
|
end: number;
|
|
43
43
|
sourceFile: SourceFile | ts.SourceFile;
|
|
44
44
|
start: number;
|
|
45
|
-
constructor(start: number, end: number, sourceFile: SourceFile | ts.SourceFile, assertion?:
|
|
46
|
-
static fromAssertion(assertion:
|
|
47
|
-
static fromNode(node: ts.Node, assertion?:
|
|
45
|
+
constructor(start: number, end: number, sourceFile: SourceFile | ts.SourceFile, assertion?: AssertionNode);
|
|
46
|
+
static fromAssertion(assertion: AssertionNode): DiagnosticOrigin;
|
|
47
|
+
static fromNode(node: ts.Node, assertion?: AssertionNode): DiagnosticOrigin;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
declare class Diagnostic {
|
|
51
|
-
#private;
|
|
52
51
|
category: DiagnosticCategory;
|
|
53
52
|
code: string | undefined;
|
|
54
53
|
origin: DiagnosticOrigin | undefined;
|
|
@@ -62,18 +61,19 @@ declare class Diagnostic {
|
|
|
62
61
|
static error(text: string | Array<string>, origin?: DiagnosticOrigin): Diagnostic;
|
|
63
62
|
extendWith(text: string | Array<string>, origin?: DiagnosticOrigin): Diagnostic;
|
|
64
63
|
static fromDiagnostics(diagnostics: Array<ts.Diagnostic>): Array<Diagnostic>;
|
|
64
|
+
static toMessageText(chain: ts.DiagnosticMessageChain): Array<string>;
|
|
65
65
|
static warning(text: string | Array<string>, origin?: DiagnosticOrigin): Diagnostic;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
type DiagnosticsHandler<T extends Diagnostic | Array<Diagnostic> = Diagnostic> = (this: void, diagnostics: T) => void;
|
|
69
69
|
|
|
70
|
-
declare enum
|
|
70
|
+
declare enum TestTreeNodeBrand {
|
|
71
71
|
Describe = "describe",
|
|
72
72
|
Test = "test",
|
|
73
73
|
Expect = "expect"
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
declare enum
|
|
76
|
+
declare enum TestTreeNodeFlags {
|
|
77
77
|
None = 0,
|
|
78
78
|
Fail = 1,
|
|
79
79
|
Only = 2,
|
|
@@ -81,45 +81,37 @@ declare enum TestMemberFlags {
|
|
|
81
81
|
Todo = 8
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
declare class
|
|
85
|
-
diagnostics: Set<ts.Diagnostic>;
|
|
86
|
-
members: Array<TestMember | Assertion>;
|
|
87
|
-
sourceFile: ts.SourceFile;
|
|
88
|
-
constructor(diagnostics: Set<ts.Diagnostic>, sourceFile: ts.SourceFile);
|
|
89
|
-
get hasOnly(): boolean;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
declare class TestMember {
|
|
84
|
+
declare class TestTreeNode {
|
|
93
85
|
#private;
|
|
94
|
-
brand:
|
|
86
|
+
brand: TestTreeNodeBrand;
|
|
87
|
+
children: Array<TestTreeNode | AssertionNode>;
|
|
95
88
|
diagnostics: Set<ts.Diagnostic>;
|
|
96
|
-
flags:
|
|
97
|
-
members: Array<TestMember | Assertion>;
|
|
89
|
+
flags: TestTreeNodeFlags;
|
|
98
90
|
name: string;
|
|
99
91
|
node: ts.CallExpression;
|
|
100
|
-
parent: TestTree |
|
|
101
|
-
constructor(compiler: typeof ts, brand:
|
|
92
|
+
parent: TestTree | TestTreeNode;
|
|
93
|
+
constructor(compiler: typeof ts, brand: TestTreeNodeBrand, node: ts.CallExpression, parent: TestTree | TestTreeNode, flags: TestTreeNodeFlags);
|
|
102
94
|
validate(): Array<Diagnostic>;
|
|
103
95
|
}
|
|
104
96
|
|
|
105
|
-
|
|
106
|
-
|
|
97
|
+
declare class TestTree {
|
|
98
|
+
children: Array<TestTreeNode | AssertionNode>;
|
|
99
|
+
diagnostics: Set<ts.Diagnostic>;
|
|
100
|
+
hasOnly: boolean;
|
|
101
|
+
sourceFile: ts.SourceFile;
|
|
102
|
+
constructor(diagnostics: Set<ts.Diagnostic>, sourceFile: ts.SourceFile);
|
|
107
103
|
}
|
|
108
|
-
|
|
104
|
+
|
|
105
|
+
declare class AssertionNode extends TestTreeNode {
|
|
106
|
+
abilityDiagnostics: Set<ts.Diagnostic> | undefined;
|
|
109
107
|
isNot: boolean;
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
matcherNode: ts.CallExpression | ts.Decorator;
|
|
109
|
+
matcherNameNode: ts.PropertyAccessExpression;
|
|
112
110
|
modifierNode: ts.PropertyAccessExpression;
|
|
113
111
|
notNode: ts.PropertyAccessExpression | undefined;
|
|
114
112
|
source: ts.NodeArray<ts.Expression> | ts.NodeArray<ts.TypeNode>;
|
|
115
|
-
target: ts.NodeArray<ts.Expression> | ts.NodeArray<ts.TypeNode
|
|
116
|
-
constructor(compiler: typeof ts, brand:
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
declare class CollectService {
|
|
120
|
-
#private;
|
|
121
|
-
constructor(compiler: typeof ts);
|
|
122
|
-
createTestTree(sourceFile: ts.SourceFile, semanticDiagnostics?: Array<ts.Diagnostic>): TestTree;
|
|
113
|
+
target: ts.NodeArray<ts.Expression> | ts.NodeArray<ts.TypeNode> | undefined;
|
|
114
|
+
constructor(compiler: typeof ts, brand: TestTreeNodeBrand, node: ts.CallExpression, parent: TestTree | TestTreeNode, flags: TestTreeNodeFlags, matcherNode: ts.CallExpression | ts.Decorator, matcherNameNode: ts.PropertyAccessExpression, modifierNode: ts.PropertyAccessExpression, notNode?: ts.PropertyAccessExpression);
|
|
123
115
|
}
|
|
124
116
|
|
|
125
117
|
declare enum OptionBrand {
|
|
@@ -207,13 +199,13 @@ interface CommandLineOptions {
|
|
|
207
199
|
*/
|
|
208
200
|
failFast?: boolean;
|
|
209
201
|
/**
|
|
210
|
-
*
|
|
202
|
+
* Fetch the specified versions of the 'typescript' package and exit.
|
|
211
203
|
*/
|
|
212
|
-
|
|
204
|
+
fetch?: boolean;
|
|
213
205
|
/**
|
|
214
|
-
*
|
|
206
|
+
* Print the list of command line options with brief descriptions and exit.
|
|
215
207
|
*/
|
|
216
|
-
|
|
208
|
+
help?: boolean;
|
|
217
209
|
/**
|
|
218
210
|
* Print the list of supported versions of the 'typescript' package and exit.
|
|
219
211
|
*/
|
|
@@ -330,6 +322,21 @@ declare class Options {
|
|
|
330
322
|
|
|
331
323
|
declare const defaultOptions: Required<ConfigFileOptions>;
|
|
332
324
|
|
|
325
|
+
declare class ProjectService {
|
|
326
|
+
#private;
|
|
327
|
+
constructor(resolvedConfig: ResolvedConfig, compiler: typeof ts);
|
|
328
|
+
closeFile(filePath: string): void;
|
|
329
|
+
getDefaultProject(filePath: string): ts.server.Project | undefined;
|
|
330
|
+
getLanguageService(filePath: string): ts.LanguageService | undefined;
|
|
331
|
+
openFile(filePath: string, sourceText?: string | undefined, projectRootPath?: string | undefined): void;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
declare class CollectService {
|
|
335
|
+
#private;
|
|
336
|
+
constructor(compiler: typeof ts, projectService: ProjectService, resolvedConfig: ResolvedConfig);
|
|
337
|
+
createTestTree(sourceFile: ts.SourceFile, semanticDiagnostics?: Array<ts.Diagnostic>): TestTree;
|
|
338
|
+
}
|
|
339
|
+
|
|
333
340
|
interface EnvironmentOptions {
|
|
334
341
|
/**
|
|
335
342
|
* Is `true` if the process is running in continuous integration environment.
|
|
@@ -406,12 +413,12 @@ declare enum ResultStatus {
|
|
|
406
413
|
}
|
|
407
414
|
|
|
408
415
|
declare class ExpectResult {
|
|
409
|
-
assertion:
|
|
416
|
+
assertion: AssertionNode;
|
|
410
417
|
diagnostics: Array<Diagnostic>;
|
|
411
418
|
parent: TestResult | undefined;
|
|
412
419
|
status: ResultStatus;
|
|
413
420
|
timing: ResultTiming;
|
|
414
|
-
constructor(assertion:
|
|
421
|
+
constructor(assertion: AssertionNode, parent?: TestResult);
|
|
415
422
|
}
|
|
416
423
|
|
|
417
424
|
declare class ResultCount {
|
|
@@ -428,17 +435,17 @@ declare class TestResult {
|
|
|
428
435
|
parent: DescribeResult | undefined;
|
|
429
436
|
results: Array<ExpectResult>;
|
|
430
437
|
status: ResultStatus;
|
|
431
|
-
test:
|
|
438
|
+
test: TestTreeNode;
|
|
432
439
|
timing: ResultTiming;
|
|
433
|
-
constructor(test:
|
|
440
|
+
constructor(test: TestTreeNode, parent?: DescribeResult);
|
|
434
441
|
}
|
|
435
442
|
|
|
436
443
|
declare class DescribeResult {
|
|
437
|
-
describe:
|
|
444
|
+
describe: TestTreeNode;
|
|
438
445
|
parent: DescribeResult | undefined;
|
|
439
446
|
results: Array<DescribeResult | TestResult>;
|
|
440
447
|
timing: ResultTiming;
|
|
441
|
-
constructor(describe:
|
|
448
|
+
constructor(describe: TestTreeNode, parent?: DescribeResult);
|
|
442
449
|
}
|
|
443
450
|
|
|
444
451
|
declare class Task {
|
|
@@ -497,8 +504,6 @@ type Event = ["config:error", {
|
|
|
497
504
|
diagnostics: Array<Diagnostic>;
|
|
498
505
|
}] | ["select:error", {
|
|
499
506
|
diagnostics: Array<Diagnostic>;
|
|
500
|
-
}] | ["deprecation:info", {
|
|
501
|
-
diagnostics: Array<Diagnostic>;
|
|
502
507
|
}] | ["run:start", {
|
|
503
508
|
result: Result;
|
|
504
509
|
}] | ["run:end", {
|
|
@@ -524,6 +529,12 @@ type Event = ["config:error", {
|
|
|
524
529
|
result: TaskResult;
|
|
525
530
|
}] | ["task:end", {
|
|
526
531
|
result: TaskResult;
|
|
532
|
+
}] | ["collect:start", {
|
|
533
|
+
testTree: TestTree;
|
|
534
|
+
}] | ["collect:node", {
|
|
535
|
+
testNode: TestTreeNode | AssertionNode;
|
|
536
|
+
}] | ["collect:end", {
|
|
537
|
+
testTree: TestTree;
|
|
527
538
|
}] | ["describe:start", {
|
|
528
539
|
result: DescribeResult;
|
|
529
540
|
}] | ["describe:end", {
|
|
@@ -581,7 +592,6 @@ interface TypeChecker extends ts.TypeChecker {
|
|
|
581
592
|
relation: {
|
|
582
593
|
assignable: Relation;
|
|
583
594
|
identity: Relation;
|
|
584
|
-
subtype: Relation;
|
|
585
595
|
};
|
|
586
596
|
}
|
|
587
597
|
|
|
@@ -589,25 +599,13 @@ declare class ExpectService {
|
|
|
589
599
|
#private;
|
|
590
600
|
private toAcceptProps;
|
|
591
601
|
private toBe;
|
|
592
|
-
private
|
|
602
|
+
private toBeApplicable;
|
|
593
603
|
private toBeAssignableTo;
|
|
594
604
|
private toBeAssignableWith;
|
|
595
|
-
private toBeBigInt;
|
|
596
|
-
private toBeBoolean;
|
|
597
|
-
private toBeNever;
|
|
598
|
-
private toBeNull;
|
|
599
|
-
private toBeNumber;
|
|
600
|
-
private toBeString;
|
|
601
|
-
private toBeSymbol;
|
|
602
|
-
private toBeUndefined;
|
|
603
|
-
private toBeUniqueSymbol;
|
|
604
|
-
private toBeUnknown;
|
|
605
|
-
private toBeVoid;
|
|
606
605
|
private toHaveProperty;
|
|
607
|
-
private toMatch;
|
|
608
606
|
private toRaiseError;
|
|
609
|
-
constructor(compiler: typeof ts, typeChecker: TypeChecker, resolvedConfig
|
|
610
|
-
match(assertion:
|
|
607
|
+
constructor(compiler: typeof ts, typeChecker: TypeChecker, resolvedConfig: ResolvedConfig);
|
|
608
|
+
match(assertion: AssertionNode, onDiagnostics: DiagnosticsHandler<Diagnostic | Array<Diagnostic>>): MatchResult | undefined;
|
|
611
609
|
}
|
|
612
610
|
|
|
613
611
|
declare class CancellationHandler implements EventHandler {
|
|
@@ -627,6 +625,11 @@ declare class ResultHandler implements EventHandler {
|
|
|
627
625
|
on([event, payload]: Event): void;
|
|
628
626
|
}
|
|
629
627
|
|
|
628
|
+
declare class TestTreeHandler implements EventHandler {
|
|
629
|
+
testTree: TestTree | undefined;
|
|
630
|
+
on([event, payload]: Event): void;
|
|
631
|
+
}
|
|
632
|
+
|
|
630
633
|
type InputHandler = (chunk: string) => void;
|
|
631
634
|
declare class InputService {
|
|
632
635
|
#private;
|
|
@@ -652,9 +655,6 @@ declare namespace ScribblerJsx {
|
|
|
652
655
|
props: Record<string, unknown>;
|
|
653
656
|
type: FunctionComponent | number | string;
|
|
654
657
|
}
|
|
655
|
-
interface ElementChildrenAttribute {
|
|
656
|
-
children: ScribblerNode;
|
|
657
|
-
}
|
|
658
658
|
interface IntrinsicElements {
|
|
659
659
|
ansi: {
|
|
660
660
|
escapes: Color | Array<Color>;
|
|
@@ -775,15 +775,6 @@ declare class PluginService {
|
|
|
775
775
|
static removeHandlers(): void;
|
|
776
776
|
}
|
|
777
777
|
|
|
778
|
-
declare class ProjectService {
|
|
779
|
-
#private;
|
|
780
|
-
constructor(resolvedConfig: ResolvedConfig, compiler: typeof ts);
|
|
781
|
-
closeFile(filePath: string): void;
|
|
782
|
-
getDefaultProject(filePath: string): ts.server.Project | undefined;
|
|
783
|
-
getLanguageService(filePath: string): ts.LanguageService | undefined;
|
|
784
|
-
openFile(filePath: string, sourceText?: string | undefined, projectRootPath?: string | undefined): void;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
778
|
declare class Runner {
|
|
788
779
|
#private;
|
|
789
780
|
static version: string;
|
|
@@ -806,6 +797,7 @@ declare class SelectDiagnosticText {
|
|
|
806
797
|
interface ManifestData {
|
|
807
798
|
$version?: string;
|
|
808
799
|
lastUpdated?: number;
|
|
800
|
+
minorVersions: Array<string>;
|
|
809
801
|
npmRegistry: string;
|
|
810
802
|
packages: Record<string, {
|
|
811
803
|
integrity: string;
|
|
@@ -818,6 +810,7 @@ declare class Manifest {
|
|
|
818
810
|
#private;
|
|
819
811
|
$version: string;
|
|
820
812
|
lastUpdated: number;
|
|
813
|
+
minorVersions: Array<string>;
|
|
821
814
|
npmRegistry: string;
|
|
822
815
|
packages: Record<string, {
|
|
823
816
|
integrity: string;
|
|
@@ -837,9 +830,7 @@ declare class Manifest {
|
|
|
837
830
|
declare class Store {
|
|
838
831
|
#private;
|
|
839
832
|
static manifest: Manifest | undefined;
|
|
840
|
-
|
|
841
|
-
static getSupportedTags(): Promise<Array<string> | undefined>;
|
|
842
|
-
static install(tag: string): Promise<void>;
|
|
833
|
+
static fetch(tag: string): Promise<void>;
|
|
843
834
|
static load(tag: string): Promise<typeof ts | undefined>;
|
|
844
835
|
static open(): Promise<void>;
|
|
845
836
|
static prune(): Promise<void>;
|
|
@@ -851,8 +842,6 @@ declare class Version {
|
|
|
851
842
|
#private;
|
|
852
843
|
static isGreaterThan(source: string, target: string): boolean;
|
|
853
844
|
static isSatisfiedWith(source: string, target: string): boolean;
|
|
854
|
-
/** @deprecated Name of this method is misleading and it is also not needed. */
|
|
855
|
-
static isVersionTag(target: string): boolean;
|
|
856
845
|
}
|
|
857
846
|
|
|
858
847
|
type WatchHandler = (filePath: string) => void;
|
|
@@ -877,4 +866,5 @@ declare class WatchService {
|
|
|
877
866
|
watch(cancellationToken: CancellationToken): AsyncIterable<Array<Task>>;
|
|
878
867
|
}
|
|
879
868
|
|
|
880
|
-
export {
|
|
869
|
+
export { AssertionNode, BaseReporter, CancellationHandler, CancellationReason, CancellationToken, Cli, CollectService, Color, Config, ConfigDiagnosticText, DescribeResult, Diagnostic, DiagnosticCategory, DiagnosticOrigin, EventEmitter, ExitCodeHandler, ExpectResult, ExpectService, FileWatcher, InputService, Line, ListReporter, OptionBrand, OptionGroup, Options, OutputService, Path, PluginService, ProjectResult, ProjectService, Result, ResultCount, ResultHandler, ResultStatus, ResultTiming, Runner, Scribbler, ScribblerJsx, Select, SelectDiagnosticText, SetupReporter, SourceFile, Store, SummaryReporter, TargetResult, Task, TaskResult, TestResult, TestTree, TestTreeHandler, TestTreeNode, TestTreeNodeBrand, TestTreeNodeFlags, Text, Version, WatchReporter, WatchService, Watcher, addsPackageText, defaultOptions, describeNameText, diagnosticText, environmentOptions, fileViewText, formattedText, helpText, summaryText, taskStatusText, testNameText, usesCompilerText, waitingForFileChangesText, watchUsageText };
|
|
870
|
+
export type { CodeFrameOptions, CommandLineOptions, ConfigFileOptions, DiagnosticsHandler, EnvironmentOptions, Event, EventHandler, FileWatchHandler, InputHandler, ItemDefinition, MatchResult, OptionDefinition, Plugin, Reporter, ReporterEvent, ResolvedConfig, ScribblerOptions, SelectHookContext, TargetResultStatus, TaskResultStatus, TypeChecker, WatchHandler, WatcherOptions };
|