tstyche 1.0.0-beta.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.
@@ -0,0 +1,679 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+
3
+ import type ts from 'typescript/lib/tsserverlibrary.js';
4
+
5
+ declare enum DiagnosticCategory {
6
+ Error = "error",
7
+ Warning = "warning"
8
+ }
9
+
10
+ interface DiagnosticOrigin {
11
+ breadcrumbs?: Array<string>;
12
+ end: number;
13
+ file: ts.SourceFile;
14
+ start: number;
15
+ }
16
+ declare class Diagnostic {
17
+ #private;
18
+ text: string | Array<string>;
19
+ category: DiagnosticCategory;
20
+ origin?: DiagnosticOrigin | undefined;
21
+ code?: string;
22
+ related?: Array<Diagnostic>;
23
+ constructor(text: string | Array<string>, category: DiagnosticCategory, origin?: DiagnosticOrigin | undefined);
24
+ add(options: {
25
+ code?: string;
26
+ related?: Array<Diagnostic>;
27
+ }): this;
28
+ static error(text: string | Array<string>, origin?: DiagnosticOrigin): Diagnostic;
29
+ static fromDiagnostics(diagnostics: ReadonlyArray<ts.Diagnostic>, compiler: typeof ts): Array<Diagnostic>;
30
+ static fromError(text: string | Array<string>, error: unknown): Diagnostic;
31
+ static isTsDiagnosticWithLocation(diagnostic: ts.Diagnostic): diagnostic is ts.DiagnosticWithLocation;
32
+ static warning(text: string | Array<string>, origin?: DiagnosticOrigin): Diagnostic;
33
+ }
34
+
35
+ declare class StoreService {
36
+ #private;
37
+ constructor();
38
+ getSupportedTags(): Array<string>;
39
+ loadCompilerModule(tag: string, signal?: AbortSignal): Promise<typeof ts | undefined>;
40
+ open(signal?: AbortSignal): Promise<void>;
41
+ prepareCompilerModule(tag: string, signal?: AbortSignal): Promise<string | undefined>;
42
+ prune(): Promise<void>;
43
+ resolveTag(tag: string): string | undefined;
44
+ update(signal?: AbortSignal): Promise<void>;
45
+ validateTag(tag: string): boolean;
46
+ }
47
+
48
+ interface TypeChecker extends ts.TypeChecker {
49
+ isTypeAssignableTo?: (source: ts.Type, target: ts.Type) => boolean;
50
+ isTypeIdenticalTo?: (source: ts.Type, target: ts.Type) => boolean;
51
+ isTypeSubtypeOf?: (source: ts.Type, target: ts.Type) => boolean;
52
+ }
53
+
54
+ declare enum OptionBrand {
55
+ String = "string",
56
+ Number = "number",
57
+ Boolean = "boolean",
58
+ List = "list",
59
+ Object = "object"
60
+ }
61
+
62
+ declare enum OptionGroup {
63
+ CommandLine = 2,
64
+ ConfigFile = 4
65
+ }
66
+
67
+ interface ItemDefinition {
68
+ brand: OptionBrand.String | OptionBrand.Object;
69
+ getDefinition?: (optionGroup: OptionGroup) => Map<string, OptionDefinition>;
70
+ name: string;
71
+ nullable?: boolean;
72
+ pattern?: string;
73
+ properties?: Array<OptionDefinition>;
74
+ }
75
+ type OptionDefinition = PrimitiveTypeOptionDefinition | ListTypeOptionDefinition | ObjectTypeOptionDefinition;
76
+ interface BaseOptionDefinition {
77
+ brand: OptionBrand;
78
+ description: string;
79
+ group: OptionGroup;
80
+ name: string;
81
+ nullable?: boolean;
82
+ required?: boolean;
83
+ }
84
+ interface PrimitiveTypeOptionDefinition extends BaseOptionDefinition {
85
+ brand: OptionBrand.String | OptionBrand.Number | OptionBrand.Boolean;
86
+ }
87
+ interface ListTypeOptionDefinition extends BaseOptionDefinition {
88
+ brand: OptionBrand.List;
89
+ items: ItemDefinition;
90
+ }
91
+ interface ObjectTypeOptionDefinition extends BaseOptionDefinition {
92
+ brand: OptionBrand.Object;
93
+ getDefinition: (optionGroup: OptionGroup) => Map<string, OptionDefinition>;
94
+ properties: Array<OptionDefinition>;
95
+ }
96
+ declare class OptionDefinitionsMap {
97
+ #private;
98
+ static for(optionGroup: OptionGroup): Map<string, OptionDefinition>;
99
+ }
100
+
101
+ /**
102
+ * Options passed through the command line.
103
+ */
104
+ interface CommandLineOptions {
105
+ /**
106
+ * Do not raise an error, if no test files are selected.
107
+ */
108
+ allowNoTestFiles?: boolean;
109
+ /**
110
+ * The path to a TSTyche configuration file.
111
+ */
112
+ config?: string;
113
+ /**
114
+ * Stop running tests after the first failed assertion.
115
+ */
116
+ failFast?: boolean;
117
+ /**
118
+ * Print the list of CLI options with brief descriptions and exit.
119
+ */
120
+ help?: boolean;
121
+ /**
122
+ * Install specified versions of the 'typescript' package and exit.
123
+ */
124
+ install?: boolean;
125
+ /**
126
+ * Print the list of the selected test files and exit.
127
+ */
128
+ listFiles?: boolean;
129
+ /**
130
+ * Only run tests with matching name.
131
+ */
132
+ only?: string;
133
+ /**
134
+ * Remove all installed versions of the 'typescript' package and exit.
135
+ */
136
+ prune?: boolean;
137
+ /**
138
+ * Print the resolved configuration and exit.
139
+ */
140
+ showConfig?: boolean;
141
+ /**
142
+ * Skip tests with matching name.
143
+ */
144
+ skip?: string;
145
+ /**
146
+ * The list of TypeScript versions to be tested on.
147
+ */
148
+ target?: Array<string>;
149
+ /**
150
+ * Fetch the 'typescript' package metadata from the registry and exit.
151
+ */
152
+ update?: boolean;
153
+ /**
154
+ * Print the version number and exit.
155
+ */
156
+ version?: boolean;
157
+ }
158
+
159
+ /**
160
+ * Options loaded from the configuration file.
161
+ */
162
+ interface ConfigFileOptions {
163
+ /**
164
+ * Do not raise an error, if no test files are selected.
165
+ */
166
+ allowNoTestFiles?: boolean;
167
+ /**
168
+ * Stop running tests after the first failed assertion.
169
+ */
170
+ failFast?: boolean;
171
+ /**
172
+ * The path to a directory containing files of a test project.
173
+ */
174
+ rootPath?: string;
175
+ /**
176
+ * The list of TypeScript versions to be tested on.
177
+ */
178
+ target?: Array<string>;
179
+ /**
180
+ * The list of glob patterns matching the test files.
181
+ */
182
+ testFileMatch?: Array<string>;
183
+ }
184
+
185
+ interface ResolvedConfig extends Omit<CommandLineOptions, keyof ConfigFileOptions>, Required<ConfigFileOptions> {
186
+ /**
187
+ * Only run test files with matching path.
188
+ */
189
+ pathMatch: Array<string>;
190
+ }
191
+ declare class ConfigService {
192
+ #private;
193
+ compiler: typeof ts;
194
+ constructor(compiler: typeof ts, storeService: StoreService);
195
+ get commandLineOptions(): CommandLineOptions;
196
+ get configFileOptions(): ConfigFileOptions;
197
+ static get defaultOptions(): Required<ConfigFileOptions>;
198
+ parseCommandLine(commandLineArgs: Array<string>): void;
199
+ readConfigFile(filePath?: string, // TODO take URL as well
200
+ sourceText?: string): Promise<void>;
201
+ resolveConfig(): ResolvedConfig;
202
+ selectTestFiles(): Array<string>;
203
+ }
204
+
205
+ declare class TSTyche {
206
+ #private;
207
+ readonly resolvedConfig: ResolvedConfig;
208
+ constructor(resolvedConfig: ResolvedConfig, storeService: StoreService);
209
+ static get version(): string;
210
+ run(testFiles: Array<string | URL>): Promise<void>;
211
+ }
212
+
213
+ declare enum AssertionSource {
214
+ Argument = 0,
215
+ TypeArgument = 1
216
+ }
217
+
218
+ declare enum TestMemberBrand {
219
+ Describe = "describe",
220
+ Test = "test",
221
+ Expect = "expect"
222
+ }
223
+
224
+ declare enum TestMemberFlags {
225
+ None = 0,
226
+ Fail = 1,
227
+ Only = 2,
228
+ Skip = 4,
229
+ Todo = 8
230
+ }
231
+
232
+ declare class TestTree {
233
+ compiler: typeof ts;
234
+ diagnostics: Array<ts.Diagnostic>;
235
+ sourceFile: ts.SourceFile;
236
+ typeChecker?: TypeChecker | undefined;
237
+ members: Array<TestMember | Assertion>;
238
+ constructor(compiler: typeof ts, diagnostics: Array<ts.Diagnostic>, sourceFile: ts.SourceFile, typeChecker?: TypeChecker | undefined);
239
+ get hasOnly(): boolean;
240
+ }
241
+
242
+ declare class TestMember {
243
+ #private;
244
+ brand: TestMemberBrand;
245
+ node: ts.CallExpression;
246
+ parent: TestTree | TestMember;
247
+ flags: TestMemberFlags;
248
+ compiler: typeof ts;
249
+ diagnostics: Array<ts.Diagnostic>;
250
+ members: Array<TestMember | Assertion>;
251
+ name: string;
252
+ typeChecker?: TypeChecker | undefined;
253
+ constructor(brand: TestMemberBrand, node: ts.CallExpression, parent: TestTree | TestMember, flags: TestMemberFlags);
254
+ get ancestorNames(): Array<string>;
255
+ validate(): Array<Diagnostic>;
256
+ }
257
+
258
+ interface MatcherNode extends ts.CallExpression {
259
+ expression: ts.PropertyAccessExpression;
260
+ }
261
+ declare class Assertion extends TestMember {
262
+ #private;
263
+ matcherNode: MatcherNode;
264
+ modifierNode: ts.PropertyAccessExpression;
265
+ notNode: ts.PropertyAccessExpression | undefined;
266
+ isNot: boolean;
267
+ name: string;
268
+ constructor(brand: TestMemberBrand, node: ts.CallExpression, parent: TestTree | TestMember, flags: TestMemberFlags, matcherNode: MatcherNode, modifierNode: ts.PropertyAccessExpression, notNode: ts.PropertyAccessExpression | undefined);
269
+ get ancestorNames(): Array<string>;
270
+ get matcherName(): ts.MemberName;
271
+ get sourceArguments(): ts.NodeArray<ts.Expression>;
272
+ get sourceType(): {
273
+ source: AssertionSource;
274
+ type: ts.Type;
275
+ } | undefined;
276
+ get targetArguments(): ts.NodeArray<ts.Expression>;
277
+ get targetType(): {
278
+ source: AssertionSource;
279
+ type: ts.Type;
280
+ } | undefined;
281
+ }
282
+
283
+ declare class CollectService {
284
+ #private;
285
+ compiler: typeof ts;
286
+ readonly matcherIdentifiers: string[];
287
+ readonly modifierIdentifiers: string[];
288
+ readonly notIdentifier = "not";
289
+ constructor(compiler: typeof ts);
290
+ createTestTree(sourceFile: ts.SourceFile, semanticDiagnostics?: Array<ts.Diagnostic>, typeChecker?: ts.TypeChecker | undefined): TestTree;
291
+ }
292
+
293
+ declare class Checker {
294
+ #private;
295
+ compiler: typeof ts;
296
+ constructor(compiler: typeof ts);
297
+ explain(assertion: Assertion): Array<Diagnostic>;
298
+ match(assertion: Assertion): boolean;
299
+ }
300
+
301
+ declare class Cli {
302
+ #private;
303
+ constructor(process: NodeJS.Process);
304
+ run(commandLineArgs: Array<string>): Promise<void>;
305
+ }
306
+
307
+ declare class Environment {
308
+ #private;
309
+ /**
310
+ * Specifies whether color should be disabled in the output.
311
+ */
312
+ static get noColor(): boolean;
313
+ /**
314
+ * The directory where to store the 'typescript' packages.
315
+ */
316
+ static get storePath(): string;
317
+ /**
318
+ * The number of seconds to wait before giving up stale operations.
319
+ */
320
+ static get timeout(): number;
321
+ }
322
+
323
+ declare class ResultTiming {
324
+ end: number;
325
+ start: number;
326
+ get duration(): number;
327
+ }
328
+
329
+ type FileResultStatus = ResultStatus.Runs | ResultStatus.Passed | ResultStatus.Failed;
330
+ declare enum ResultStatus {
331
+ Runs = "runs",
332
+ Passed = "passed",
333
+ Failed = "failed",
334
+ Skipped = "skipped",
335
+ Todo = "todo"
336
+ }
337
+
338
+ declare class ExpectResult {
339
+ assertion: Assertion;
340
+ parent: TestResult | undefined;
341
+ diagnostics: Array<Diagnostic>;
342
+ status: ResultStatus;
343
+ timing: ResultTiming;
344
+ constructor(assertion: Assertion, parent: TestResult | undefined);
345
+ }
346
+
347
+ declare class ResultCount {
348
+ failed: number;
349
+ passed: number;
350
+ skipped: number;
351
+ todo: number;
352
+ get total(): number;
353
+ }
354
+
355
+ declare class TestResult {
356
+ test: TestMember;
357
+ parent: DescribeResult | undefined;
358
+ diagnostics: Array<Diagnostic>;
359
+ expectCount: ResultCount;
360
+ results: Array<ExpectResult>;
361
+ status: ResultStatus;
362
+ timing: ResultTiming;
363
+ constructor(test: TestMember, parent: DescribeResult | undefined);
364
+ }
365
+
366
+ declare class DescribeResult {
367
+ describe: TestMember;
368
+ parent: DescribeResult | undefined;
369
+ results: Array<DescribeResult | TestResult>;
370
+ timing: ResultTiming;
371
+ constructor(describe: TestMember, parent: DescribeResult | undefined);
372
+ }
373
+
374
+ declare class FileResult {
375
+ testFile: URL;
376
+ diagnostics: Array<Diagnostic>;
377
+ expectCount: ResultCount;
378
+ results: Array<DescribeResult | TestResult | ExpectResult>;
379
+ status: FileResultStatus;
380
+ testCount: ResultCount;
381
+ timing: ResultTiming;
382
+ constructor(testFile: URL);
383
+ }
384
+
385
+ declare class ProjectResult {
386
+ compilerVersion: string;
387
+ projectConfigFilePath: string | undefined;
388
+ diagnostics: Array<Diagnostic>;
389
+ results: Array<FileResult>;
390
+ constructor(compilerVersion: string, projectConfigFilePath: string | undefined);
391
+ }
392
+
393
+ declare class TargetResult {
394
+ versionTag: string;
395
+ testFiles: Array<URL>;
396
+ results: Map<string | undefined, ProjectResult>;
397
+ status: ResultStatus.Runs | ResultStatus.Passed | ResultStatus.Failed;
398
+ timing: ResultTiming;
399
+ constructor(versionTag: string, testFiles: Array<URL>);
400
+ }
401
+
402
+ declare class Result {
403
+ resolvedConfig: ResolvedConfig;
404
+ testFiles: Array<URL>;
405
+ expectCount: ResultCount;
406
+ fileCount: ResultCount;
407
+ results: Array<TargetResult>;
408
+ targetCount: ResultCount;
409
+ testCount: ResultCount;
410
+ timing: ResultTiming;
411
+ constructor(resolvedConfig: ResolvedConfig, testFiles: Array<URL>);
412
+ }
413
+
414
+ declare class ResultManager {
415
+ #private;
416
+ handleEvent([eventName, payload]: Event): void;
417
+ }
418
+
419
+ type Event = ["start", {
420
+ result: Result;
421
+ }] | ["end", {
422
+ result: Result;
423
+ }] | ["config:error", {
424
+ diagnostics: Array<Diagnostic>;
425
+ }] | ["store:info", {
426
+ compilerVersion: string;
427
+ installationPath: string;
428
+ }] | ["store:error", {
429
+ diagnostics: Array<Diagnostic>;
430
+ }] | ["target:start", {
431
+ result: TargetResult;
432
+ }] | ["target:end", {
433
+ result: TargetResult;
434
+ }] | ["project:info", {
435
+ compilerVersion: string;
436
+ projectConfigFilePath: string | undefined;
437
+ }] | ["project:error", {
438
+ diagnostics: Array<Diagnostic>;
439
+ }] | ["file:start", {
440
+ result: FileResult;
441
+ }] | ["file:error", {
442
+ diagnostics: Array<Diagnostic>;
443
+ result: FileResult;
444
+ }] | ["file:end", {
445
+ result: FileResult;
446
+ }] | ["describe:start", {
447
+ result: DescribeResult;
448
+ }] | ["describe:end", {
449
+ result: DescribeResult;
450
+ }] | ["test:start", {
451
+ result: TestResult;
452
+ }] | ["test:error", {
453
+ diagnostics: Array<Diagnostic>;
454
+ result: TestResult;
455
+ }] | ["test:fail", {
456
+ result: TestResult;
457
+ }] | ["test:pass", {
458
+ result: TestResult;
459
+ }] | ["test:skip", {
460
+ result: TestResult;
461
+ }] | ["test:todo", {
462
+ result: TestResult;
463
+ }] | ["expect:start", {
464
+ result: ExpectResult;
465
+ }] | ["expect:error", {
466
+ diagnostics: Array<Diagnostic>;
467
+ result: ExpectResult;
468
+ }] | ["expect:fail", {
469
+ diagnostics: Array<Diagnostic>;
470
+ result: ExpectResult;
471
+ }] | ["expect:pass", {
472
+ result: ExpectResult;
473
+ }] | ["expect:skip", {
474
+ result: ExpectResult;
475
+ }];
476
+ type EventHandler = (event: Event) => void;
477
+ declare class EventEmitter {
478
+ #private;
479
+ static addHandler(handler: EventHandler): void;
480
+ static dispatch(event: Event): void;
481
+ static removeHandler(handler: EventHandler): void;
482
+ }
483
+
484
+ /**
485
+ * Options to configure an instance of the {@link Logger}.
486
+ */
487
+ interface LoggerOptions {
488
+ /**
489
+ * Specifies whether color should be disabled in the output. Default: `Environment.noColor`.
490
+ */
491
+ noColor?: boolean;
492
+ /**
493
+ * A stream to write warnings and errors. Default: `process.stdout`.
494
+ */
495
+ stderr?: NodeJS.WritableStream;
496
+ /**
497
+ * A stream to write informational messages. Default: `process.stderr`.
498
+ */
499
+ stdout?: NodeJS.WritableStream;
500
+ }
501
+ /**
502
+ * Wraps the provided streams with a set of convenience methods.
503
+ */
504
+ declare class Logger {
505
+ #private;
506
+ /**
507
+ * @param options - {@link LoggerOptions | Options} to configure an instance of the Logger.
508
+ */
509
+ constructor(options?: LoggerOptions);
510
+ /**
511
+ * Moves the cursor one line up and erases the line when the `stdout` stream
512
+ * is interactive. Otherwise does nothing.
513
+ */
514
+ eraseLastLine(): void;
515
+ /**
516
+ * Returns `true` if the `stdout` stream is interactive.
517
+ */
518
+ isInteractive(): boolean;
519
+ writeError(body: JSX.Element | Array<JSX.Element>): void;
520
+ writeMessage(body: JSX.Element | Array<JSX.Element>): void;
521
+ writeWarning(body: JSX.Element | Array<JSX.Element>): void;
522
+ }
523
+
524
+ declare class ProjectService {
525
+ #private;
526
+ compiler: typeof ts;
527
+ constructor(compiler: typeof ts);
528
+ closeFile(filePath: string): void;
529
+ getDefaultProject(filePath: string): ts.server.Project | undefined;
530
+ getLanguageService(filePath: string): ts.LanguageService | undefined;
531
+ openFile(filePath: string, sourceText?: string | undefined, projectRootPath?: string | undefined): void;
532
+ }
533
+
534
+ declare abstract class Reporter {
535
+ readonly resolvedConfig: ResolvedConfig;
536
+ protected logger: Logger;
537
+ constructor(resolvedConfig: ResolvedConfig);
538
+ abstract handleEvent([eventName, payload]: Event): void;
539
+ }
540
+
541
+ declare class SummaryReporter extends Reporter {
542
+ handleEvent([eventName, payload]: Event): void;
543
+ }
544
+
545
+ declare class ThoroughReporter extends Reporter {
546
+ #private;
547
+ handleEvent([eventName, payload]: Event): void;
548
+ }
549
+
550
+ declare class TaskRunner {
551
+ #private;
552
+ readonly resolvedConfig: ResolvedConfig;
553
+ constructor(resolvedConfig: ResolvedConfig, storeService: StoreService);
554
+ run(testFiles: Array<URL>, target: Array<string>, signal?: AbortSignal): Promise<Result>;
555
+ }
556
+
557
+ declare enum Color {
558
+ Reset = "0",
559
+ Red = "31",
560
+ Green = "32",
561
+ Yellow = "33",
562
+ Blue = "34",
563
+ Magenta = "35",
564
+ Cyan = "36",
565
+ Gray = "90"
566
+ }
567
+
568
+ declare function addsPackageStepText(compilerVersion: string, installationPath: string): JSX.Element;
569
+
570
+ declare function describeNameText(name: string, indent?: number): JSX.Element;
571
+
572
+ declare function diagnosticText(diagnostic: Diagnostic): JSX.Element;
573
+
574
+ declare function fileStatusText(status: FileResultStatus, testFile: URL): JSX.Element;
575
+
576
+ declare function fileViewText(lines: Array<JSX.Element>, addEmptyFinalLine: boolean): JSX.Element;
577
+
578
+ interface LineProps {
579
+ children?: JSX.ElementChildrenAttribute["children"];
580
+ color?: Color;
581
+ indent?: number;
582
+ }
583
+ declare class Line implements JSX.ElementClass {
584
+ readonly props: LineProps;
585
+ constructor(props: LineProps);
586
+ render(): JSX.Element;
587
+ }
588
+
589
+ declare function summaryText({ duration, expectCount, fileCount, onlyMatch, pathMatch, skipMatch, targetCount, testCount, }: {
590
+ duration: number;
591
+ expectCount: ResultCount;
592
+ fileCount: ResultCount;
593
+ onlyMatch: string | undefined;
594
+ pathMatch: Array<string>;
595
+ skipMatch: string | undefined;
596
+ targetCount: ResultCount;
597
+ testCount: ResultCount;
598
+ }): JSX.Element;
599
+
600
+ declare function testNameText(status: "fail" | "pass" | "skip" | "todo", name: string, indent?: number): JSX.Element;
601
+
602
+ interface TextProps {
603
+ children?: JSX.ElementChildrenAttribute["children"];
604
+ color?: Color | undefined;
605
+ indent?: number | undefined;
606
+ }
607
+ declare class Text implements JSX.ElementClass {
608
+ readonly props: TextProps;
609
+ constructor(props: TextProps);
610
+ render(): JSX.Element;
611
+ }
612
+
613
+ declare function usesCompilerStepText(compilerVersion: string, tsconfigFilePath: string | undefined, options?: {
614
+ prependEmptyLine: boolean;
615
+ }): JSX.Element;
616
+
617
+ type ElementChildren = Array<ElementChildren> | JSX.Element | string | undefined;
618
+ type ComponentConstructor = new (props: Record<string, unknown>) => JSX.ElementClass;
619
+ declare global {
620
+ namespace JSX {
621
+ interface Element {
622
+ $$typeof: symbol;
623
+ children: ElementChildren;
624
+ props: Record<string, unknown> | null;
625
+ type: ComponentConstructor | string;
626
+ }
627
+ interface ElementAttributesProperty {
628
+ props: Record<string, unknown> | null;
629
+ }
630
+ interface ElementClass {
631
+ render: () => JSX.Element | null;
632
+ }
633
+ interface ElementChildrenAttribute {
634
+ children: ElementChildren;
635
+ }
636
+ interface IntrinsicElements {
637
+ ansi: {
638
+ children?: never;
639
+ escapes: Color | Array<Color>;
640
+ };
641
+ newline: {
642
+ children?: never;
643
+ };
644
+ text: {
645
+ children: ElementChildren;
646
+ indent?: number | undefined;
647
+ };
648
+ }
649
+ }
650
+ }
651
+ /**
652
+ * Options to configure an instance of the {@link Scribbler}.
653
+ */
654
+ interface ScribblerOptions {
655
+ /**
656
+ * Do not include ANSI color escape codes in the output. Default: `false`.
657
+ */
658
+ noColors?: boolean;
659
+ }
660
+ /**
661
+ * Provides the JSX factory function and renderer.
662
+ */
663
+ declare class Scribbler {
664
+ #private;
665
+ /**
666
+ * @param options - {@link ScribblerOptions | Options} to configure an instance of the Scribbler.
667
+ */
668
+ constructor(options?: ScribblerOptions);
669
+ /**
670
+ * Creates a new text element of the given `type`.
671
+ */
672
+ static createElement(type: ComponentConstructor | string, props: Record<string, unknown> | null, ...children: Array<ElementChildren>): JSX.Element;
673
+ /**
674
+ * Renders the provided JSX `element` and returns the resulting string.
675
+ */
676
+ render(element: JSX.Element | null): string;
677
+ }
678
+
679
+ export { Assertion, AssertionSource, Checker, Cli, CollectService, Color, type CommandLineOptions, type ConfigFileOptions, ConfigService, DescribeResult, Diagnostic, DiagnosticCategory, type DiagnosticOrigin, Environment, type Event, EventEmitter, type EventHandler, ExpectResult, FileResult, type FileResultStatus, type ItemDefinition, Line, Logger, type LoggerOptions, OptionBrand, type OptionDefinition, OptionDefinitionsMap, OptionGroup, ProjectResult, ProjectService, Reporter, type ResolvedConfig, Result, ResultCount, ResultManager, ResultStatus, ResultTiming, Scribbler, type ScribblerOptions, StoreService, SummaryReporter, TSTyche, TargetResult, TaskRunner, TestMember, TestMemberBrand, TestMemberFlags, TestResult, TestTree, Text, ThoroughReporter, type TypeChecker, addsPackageStepText, describeNameText, diagnosticText, fileStatusText, fileViewText, summaryText, testNameText, usesCompilerStepText };