microsoft / microsoft/typespec

[http-server-javascript] Investigate necessity of splitReturnTypes

Open
#3,787 0 comments 0 reactions 0 assignees View on GitHub
emitter:service:js triaged:core
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

The HTTP server emitter for JS contains a subsystem called `SplitReturnTypes` that was inherited from an earlier generation of the emitter. It is not exactly dead code, but I suspect it is "inoperative" i.e. does not actually do anything meaningful.

SplitReturnTypes allows cleaving a union of types into types that represent successful responses and types that represent error responses. It may be desirable to do this in the JS emitter if we want to provide separate return paths for errors than success responses. This issue tracks investigating whether or not this is feasible and desirable, and removing the vestigial code if it is not.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.