Skip to content

Commit

Permalink
apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
taefi committed Aug 7, 2024
1 parent 3812735 commit 61b182c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/ts/generator-plugin-signals/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function extractEndpointMethodsWithSignalsAsReturnType(storage: SharedStorage):
const response200 = pathObject?.post?.responses['200'];
return response200 && !('$ref' in response200);
})
.map(([path, pathObject]) => {
.flatMap(([path, pathObject]) => {
const response200 = pathObject?.post?.responses['200'];
const responseSchema = (response200 as OpenAPIV3.ResponseObject).content?.['application/json']?.schema;

Expand All @@ -29,8 +29,7 @@ function extractEndpointMethodsWithSignalsAsReturnType(storage: SharedStorage):
}))
: [];
})
.filter((signalArray) => signalArray !== undefined)
.reduce<PathSignalType[]>((acc, current) => acc.concat(current), []);
.filter((signalArray) => signalArray !== undefined);
}

function groupByService(signals: readonly PathSignalType[]): Map<string, Map<string, string>> {
Expand Down

0 comments on commit 61b182c

Please sign in to comment.