forked from tsdjs/tsd
-
Notifications
You must be signed in to change notification settings - Fork 1
/
interfaces.ts
50 lines (42 loc) · 1.03 KB
/
interfaces.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import {CompilerOptions} from '../../libraries/typescript';
export interface RawCompilerOptions {
[option: string]: any;
}
export interface Config<Options = CompilerOptions> {
directory: string;
compilerOptions: Options;
}
export type RawConfig = Partial<Config<RawCompilerOptions>>;
export interface Context {
cwd: string;
pkg: any;
typingsFile: string;
testFiles: string[];
config: Config;
}
export enum DiagnosticCode {
AwaitIsOnlyAllowedInAsyncFunction = 1308,
GenericTypeRequiresTypeArguments = 2314,
TypeIsNotAssignableToOtherType = 2322,
PropertyDoesNotExistOnType = 2339,
ArgumentTypeIsNotAssignableToParameterType = 2345,
CannotAssignToReadOnlyProperty = 2540,
ExpectedArgumentsButGotOther = 2554,
NoOverloadMatches = 2769
}
export interface Diagnostic {
fileName: string;
message: string;
severity: 'error' | 'warning';
line?: number;
column?: number;
}
export interface ExtendedDiagnostic {
numTests: number;
diagnostics: Diagnostic[];
}
export interface Location {
fileName: string;
start: number;
end: number;
}