Http-client-js operation response on the client doesn't carry the return type
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- api
Research direction
Start with the linked TypeSpec Playground example and trace the generated client operation wrapper and its dedicated function. Check how the return type is inferred for the wrapper, then verify the generated method declares the same Promise return type shown in the expected output. Done means the client method visibly carries that return type without changing its behavior.
Written by the indexing model from the issue text.
Description
The return type is infered from the call of the dedicated function but for readability it should be good to repeat it
Actual
async test(options?: TestOptions) {
return test(this.#context, options);
}
export async function test(
client: SClientContext,
options?: TestOptions,
): Promise<string> {
Expected
async test(options?: TestOptions): Promise<string> {
return test(this.#context, options);
}
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 395
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 105
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/typespec
-
bug emitter:client:python
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug emitter:openapi3 triaged:core
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug emitter:service:csharp triaged:core
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
emitter:client:java feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
emitter:client:js
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
All issues in microsoft/typespec
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100