1 | import * as acorn from "acorn";
|
2 | import * as ts from "typescript";
|
3 | import { Transform } from "./transforms";
|
4 | export interface KarmaTypescriptConfig {
|
5 | [key: string]: any;
|
6 | bundlerOptions?: BundlerOptions;
|
7 | compilerDelay?: number;
|
8 | compilerOptions?: any;
|
9 | coverageOptions?: CoverageOptions;
|
10 | exclude?: string[] | Extendable;
|
11 | include?: string[] | Extendable;
|
12 | reports?: Reports;
|
13 | transformPath?: (filepath: string) => string;
|
14 | tsconfig?: string;
|
15 | stopOnFailure?: boolean;
|
16 | }
|
17 | export interface BundlerOptions {
|
18 | acornOptions?: acorn.Options;
|
19 | addNodeGlobals?: boolean;
|
20 | constants?: {
|
21 | [key: string]: any;
|
22 | };
|
23 | entrypoints?: RegExp;
|
24 | exclude?: string[];
|
25 | ignore?: string[];
|
26 | noParse?: string[];
|
27 | resolve?: Resolve;
|
28 | sourceMap?: boolean;
|
29 | transforms?: Transform[];
|
30 | validateSyntax?: boolean;
|
31 | }
|
32 | export interface Extendable {
|
33 | mode: "merge" | "replace";
|
34 | values: string[];
|
35 | }
|
36 | export interface Resolve {
|
37 | alias?: {
|
38 | [key: string]: string;
|
39 | };
|
40 | extensions?: string[];
|
41 | directories?: string[];
|
42 | }
|
43 | export interface CompilerOptions extends ts.CompilerOptions {
|
44 | [key: string]: any;
|
45 | }
|
46 | export interface ThresholdOptions {
|
47 | file?: {
|
48 | branches?: number;
|
49 | excludes?: string[];
|
50 | functions?: number;
|
51 | lines?: number;
|
52 | overrides?: {
|
53 | [key: string]: {
|
54 | branches?: number;
|
55 | functions?: number;
|
56 | lines?: number;
|
57 | statements: number;
|
58 | };
|
59 | };
|
60 | statements?: number;
|
61 | };
|
62 | global?: {
|
63 | branches?: number;
|
64 | excludes?: string[];
|
65 | functions?: number;
|
66 | lines?: number;
|
67 | statements?: number;
|
68 | };
|
69 | }
|
70 | export interface CoverageOptions {
|
71 | instrumentation?: boolean;
|
72 | instrumenterOptions?: any;
|
73 | exclude?: RegExp | RegExp[];
|
74 | threshold?: ThresholdOptions;
|
75 | watermarks?: any;
|
76 | }
|
77 | export interface Reports {
|
78 | clover?: string | Destination;
|
79 | cobertura?: string | Destination;
|
80 | html?: string | Destination;
|
81 | "html-spa"?: string | Destination;
|
82 | "json-summary"?: string | Destination;
|
83 | json?: string | Destination;
|
84 | lcovonly?: string | Destination;
|
85 | teamcity?: string | Destination;
|
86 | "text-lcov"?: string | Destination;
|
87 | "text-summary"?: string | Destination;
|
88 | text?: string | Destination;
|
89 | [key: string]: string | Destination;
|
90 | }
|
91 | export interface Destination {
|
92 | directory?: string;
|
93 | filename?: string;
|
94 | subdirectory?: string | (() => void);
|
95 | }
|
96 |
|
\ | No newline at end of file |