tstyche 7.1.0 → 7.2.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.
Files changed (3) hide show
  1. package/dist/api.d.ts +22 -5
  2. package/dist/api.js +578 -636
  3. package/package.json +7 -3
package/dist/api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type ts from 'typescript';
1
+ import ts from 'typescript';
2
2
 
3
3
  declare enum CancellationReason {
4
4
  ConfigChange = "configChange",
@@ -84,6 +84,7 @@ declare class DiagnosticOrigin {
84
84
  sourceFile: ts.SourceFile | JsonSourceFile;
85
85
  start: number;
86
86
  constructor(start: number, end: number, sourceFile: ts.SourceFile | JsonSourceFile, assertionNode?: ExpectNode);
87
+ static fromAbilityDiagnostic(diagnostic: ts.DiagnosticWithLocation, assertionNode: ExpectNode): DiagnosticOrigin;
87
88
  static fromAssertion(assertionNode: ExpectNode): DiagnosticOrigin;
88
89
  static fromNode(node: ts.Node, assertionNode?: ExpectNode): DiagnosticOrigin;
89
90
  }
@@ -105,12 +106,27 @@ declare class Diagnostic {
105
106
  static warning(text: string | Array<string>, origin?: DiagnosticOrigin): Diagnostic;
106
107
  }
107
108
 
109
+ type DiagnosticsHandler<T extends Diagnostic | Array<Diagnostic> = Diagnostic> = (this: void, diagnostics: T) => void;
110
+ interface Offset {
111
+ position: number;
112
+ diff: number;
113
+ }
114
+
108
115
  declare function diagnosticBelongsToNode(diagnostic: ts.Diagnostic, node: ts.NodeArray<ts.Node> | ts.Node): boolean;
109
116
  declare function getDiagnosticMessageText(diagnostic: ts.Diagnostic): string | Array<string>;
110
117
  declare function getTextSpanEnd(span: ts.TextSpan): number;
111
118
  declare function isDiagnosticWithLocation(diagnostic: ts.Diagnostic): diagnostic is ts.DiagnosticWithLocation;
112
119
 
113
- type DiagnosticsHandler<T extends Diagnostic | Array<Diagnostic> = Diagnostic> = (this: void, diagnostics: T) => void;
120
+ declare class MappedDiagnostic {
121
+ category: ts.DiagnosticCategory;
122
+ code: number;
123
+ file: ts.SourceFile;
124
+ length: number | undefined;
125
+ messageText: string | ts.DiagnosticMessageChain;
126
+ relatedInformation?: Array<ts.DiagnosticRelatedInformation>;
127
+ start: number | undefined;
128
+ constructor(sourceFile: ts.SourceFile, diagnostic: ts.Diagnostic, offsets?: Array<Offset>);
129
+ }
114
130
 
115
131
  declare class JsonSourceFile {
116
132
  #private;
@@ -272,12 +288,13 @@ declare class Options {
272
288
  }
273
289
 
274
290
  interface EnvironmentOptions {
291
+ fetchRetries: number;
292
+ fetchTimeout: number;
275
293
  isCi: boolean;
276
294
  noColor: boolean;
277
295
  noInteractive: boolean;
278
296
  npmRegistry: string;
279
297
  storePath: string;
280
- timeout: number;
281
298
  typescriptModule: string | undefined;
282
299
  }
283
300
 
@@ -740,5 +757,5 @@ declare class Version {
740
757
  static isSatisfiedWith(source: string, target: string): boolean;
741
758
  }
742
759
 
743
- export { BaseReporter, CancellationReason, CancellationToken, Cli, Color, Config, ConfigDiagnosticText, DescribeResult, Diagnostic, DiagnosticCategory, DiagnosticOrigin, Directive, DotReporter, EventEmitter, ExpectResult, FileLocation, FileResult, Line, ListReporter, OptionBrand, OptionGroup, Options, OutputService, Path, ProjectConfigKind, ProjectResult, Result, ResultStatus, Runner, Scribbler, ScribblerJsx, Select, SelectDiagnosticText, SetupReporter, Store, StreamController, SummaryReporter, SuppressedResult, TargetResult, TestResult, Text, Version, WatchReporter, addsText, defaultOptions, describeNameText, diagnosticBelongsToNode, diagnosticText, dotText, environmentOptions, fileStatusText, formattedText, getDiagnosticMessageText, getTextSpanEnd, helpText, isDiagnosticWithLocation, prologueText, summaryText, testNameText, usesText, waitingForFileChangesText, watchUsageText };
744
- export type { AssertionCounts, AssertionResultStatus, CodeFrameOptions, CommandLineOptions, ConfigFileOptions, DiagnosticsHandler, DirectiveRange, EnvironmentOptions, Event, EventHandler, FileCounts, FileResultStatus, InlineConfig, ItemDefinition, OptionDefinition, ProjectConfig, Reporter, ReporterEvent, ResolvedConfig, ResultCounts, ResultTiming, ScribblerOptions, SuppressedCounts, SuppressedResultStatus, TargetCounts, TargetResultStatus, TestCounts, TestResultStatus, TextRange, WriteStream };
760
+ export { BaseReporter, CancellationReason, CancellationToken, Cli, Color, Config, ConfigDiagnosticText, DescribeResult, Diagnostic, DiagnosticCategory, DiagnosticOrigin, Directive, DotReporter, EventEmitter, ExpectResult, FileLocation, FileResult, Line, ListReporter, MappedDiagnostic, OptionBrand, OptionGroup, Options, OutputService, Path, ProjectConfigKind, ProjectResult, Result, ResultStatus, Runner, Scribbler, ScribblerJsx, Select, SelectDiagnosticText, SetupReporter, Store, StreamController, SummaryReporter, SuppressedResult, TargetResult, TestResult, Text, Version, WatchReporter, addsText, defaultOptions, describeNameText, diagnosticBelongsToNode, diagnosticText, dotText, environmentOptions, fileStatusText, formattedText, getDiagnosticMessageText, getTextSpanEnd, helpText, isDiagnosticWithLocation, prologueText, summaryText, testNameText, usesText, waitingForFileChangesText, watchUsageText };
761
+ export type { AssertionCounts, AssertionResultStatus, CodeFrameOptions, CommandLineOptions, ConfigFileOptions, DiagnosticsHandler, DirectiveRange, EnvironmentOptions, Event, EventHandler, FileCounts, FileResultStatus, InlineConfig, ItemDefinition, Offset, OptionDefinition, ProjectConfig, Reporter, ReporterEvent, ResolvedConfig, ResultCounts, ResultTiming, ScribblerOptions, SuppressedCounts, SuppressedResultStatus, TargetCounts, TargetResultStatus, TestCounts, TestResultStatus, TextRange, WriteStream };