Skip to content

Commit 61b182c

Browse files
committed
apply suggestions from code review
1 parent 3812735 commit 61b182c

File tree

1 file changed

+2
-3
lines changed
  • packages/ts/generator-plugin-signals/src

1 file changed

+2
-3
lines changed

packages/ts/generator-plugin-signals/src/index.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function extractEndpointMethodsWithSignalsAsReturnType(storage: SharedStorage):
1616
const response200 = pathObject?.post?.responses['200'];
1717
return response200 && !('$ref' in response200);
1818
})
19-
.map(([path, pathObject]) => {
19+
.flatMap(([path, pathObject]) => {
2020
const response200 = pathObject?.post?.responses['200'];
2121
const responseSchema = (response200 as OpenAPIV3.ResponseObject).content?.['application/json']?.schema;
2222

@@ -29,8 +29,7 @@ function extractEndpointMethodsWithSignalsAsReturnType(storage: SharedStorage):
2929
}))
3030
: [];
3131
})
32-
.filter((signalArray) => signalArray !== undefined)
33-
.reduce<PathSignalType[]>((acc, current) => acc.concat(current), []);
32+
.filter((signalArray) => signalArray !== undefined);
3433
}
3534

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

0 commit comments

Comments
 (0)