Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
bitgopatmcl committed Nov 6, 2024
1 parent 0f89046 commit c4ce355
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions packages/openapi-generator/src/codec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,17 @@ function parseTemplateLiteral(
}

const quasis = template.quasis.map((quasi) => quasi.cooked);
const result = quasis.reduce((acc, quasi, index) => {
if (index < literals.length) {
acc.push(quasi ?? '', literals[index]!);
} else {
acc.push(quasi ?? '');
}
return acc;
}, [] as (string | Schema)[]);
const result = quasis.reduce(
(acc, quasi, index) => {
if (index < literals.length) {
acc.push(quasi ?? '', literals[index]!);
} else {
acc.push(quasi ?? '');
}
return acc;
},
[] as (string | Schema)[],
);

return E.right({
type: 'string',
Expand Down

0 comments on commit c4ce355

Please sign in to comment.