diff options
| author | Kevin Hoerr <kjhoerr@noreply.cybr.es> | 2019-11-10 19:24:16 +0000 |
|---|---|---|
| committer | Gitea <gitea@fake.local> | 2019-11-10 19:24:16 +0000 |
| commit | 170c53200634dc9be8f1cf3d23e32448e7f5f915 (patch) | |
| tree | 7802c07d006cd6186cf80833cb1056ffb5df90b7 /formats.ts | |
| parent | 57acd7e00b445a075e6f57a69f5cdbdedf3e038a (diff) | |
| parent | c045555e00a926e3506a80824d43ffc887e196f5 (diff) | |
| download | ao-coverage-170c53200634dc9be8f1cf3d23e32448e7f5f915.tar.gz ao-coverage-170c53200634dc9be8f1cf3d23e32448e7f5f915.tar.bz2 ao-coverage-170c53200634dc9be8f1cf3d23e32448e7f5f915.zip | |
Merge branch 'init-commits' of kjhoerr/ao-coverage into master
Diffstat (limited to 'formats.ts')
| -rw-r--r-- | formats.ts | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/formats.ts b/formats.ts new file mode 100644 index 0000000..b5a24bf --- /dev/null +++ b/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 |
