Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalMarsalek committed Apr 25, 2024
1 parent 4be883d commit 68433ca
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions src/cover/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,27 +179,29 @@ function runCoverTableRecipe(recipe: CoverTableRecipe): Table {
function runCoverTableRecipeMd(recipe: CoverTableRecipe): TableForMd {
return Object.fromEntries(
Object.entries(recipe)
.map(([key, f]) => {
return [
key,
langs
.map((lang) => {
const output = compileVariant(
f(lang),
{
level: "nogolf",
restrictFrontend: false,
skipTypecheck: true,
},
lang,
).result;
if (typeof output === "string") {
return { lang, output };
}
})
.filter((x) => x !== undefined),
] as [string, { lang: Language; output: string }[]];
})
.map(
([key, f]) =>
[
key,
langs
.map((lang) => {
const output = compileVariant(
f(lang),
{
level: "nogolf",
restrictFrontend: false,
skipTypecheck: true,
},
lang,
).result;
if (typeof output === "string") {
return { lang, output };
}
return undefined;
})
.filter((x) => x !== undefined),
] as [string, { lang: Language; output: string }[]],
)
.filter((x) => x[1].length > 0),
);
}
Expand Down

0 comments on commit 68433ca

Please sign in to comment.