Skip to content

[http-server-js] handle Scalar and value literal return types in result processing#10058

Open
witemple-msft wants to merge 1 commit intomicrosoft:mainfrom
witemple-msft:wt/typespec/10005-bug-error-unimplemented-result-processing-for-ty
Open

[http-server-js] handle Scalar and value literal return types in result processing#10058
witemple-msft wants to merge 1 commit intomicrosoft:mainfrom
witemple-msft:wt/typespec/10005-bug-error-unimplemented-result-processing-for-ty

Conversation

@witemple-msft
Copy link
Member

Adds a branch in emitResultProcessingForType to handle top-level Scalar and value literal (String, Number, Boolean) return types, using the existing JSON serialization helpers. Previously, any operation returning a bare scalar (e.g. @get op read(): string;) would crash with:

Error: Unimplemented: result processing for type kind 'Scalar'

Fixes #10005

…result processing

Adds a branch in `emitResultProcessingForType` to handle top-level `Scalar`
and value literal (`String`, `Number`, `Boolean`) return types, using the
existing JSON serialization helpers. Previously, any operation returning a bare
scalar (e.g. `@get op read(): string;`) would crash with:

  Error: Unimplemented: result processing for type kind 'Scalar'

Fixes microsoft#10005

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 17, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-server-js@10058

commit: 744c34a

@github-actions
Copy link
Contributor

❌ There is undocummented changes. Run chronus add to add a changeset or click here.

The following packages have changes but are not documented.

  • @typespec/http-server-js
Show changes

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Error: Unimplemented: result processing for type kind 'Scalar'

3 participants