diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2019-11-10 14:34:18 -0500 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2019-11-10 14:34:18 -0500 |
| commit | a4fdedfcac02cb53608d9d3b9e96de0526140fd7 (patch) | |
| tree | 9a72cf7335065e03e105f0ccdb4ac3cd5a0e70ba /src/formats.ts | |
| parent | 170c53200634dc9be8f1cf3d23e32448e7f5f915 (diff) | |
| download | ao-coverage-a4fdedfcac02cb53608d9d3b9e96de0526140fd7.tar.gz ao-coverage-a4fdedfcac02cb53608d9d3b9e96de0526140fd7.tar.bz2 ao-coverage-a4fdedfcac02cb53608d9d3b9e96de0526140fd7.zip | |
Move TS files into /src
Diffstat (limited to 'src/formats.ts')
| -rw-r--r-- | src/formats.ts | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/formats.ts b/src/formats.ts new file mode 100644 index 0000000..b5a24bf --- /dev/null +++ b/src/formats.ts @@ -0,0 +1,33 @@ +interface Format { + parse_coverage: (file: Document) => number; +} + +interface FormatList { + [key: string]: Format +} + +interface FormatObj { + formats: FormatList, + list_formats: () => string[], + get_format: (format: string) => Format, +} + +const FormatsObj: FormatObj = { + formats: { + tarpaulin: { + parse_coverage: (file: Document) => { + return 0.0; + } + }, + }, + + list_formats: function () { + return Object.keys(this.formats); + }, + + get_format: function (format: string) { + return this.formats[format]; + } +} + +export default FormatsObj;
\ No newline at end of file |
