Skip to content

Allow go to definition to work for paths (trpc style) #1462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task
tonyxiao opened this issue Nov 27, 2023 · 2 comments
Open
1 task

Allow go to definition to work for paths (trpc style) #1462

tonyxiao opened this issue Nov 27, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request openapi-fetch Relevant to the openapi-fetch library PRs welcome PRs are welcome to solve this issue!

Comments

@tonyxiao
Copy link

Description

When calling APIs it is frequently extremely useful to be able to see its definition in the typing file, what are the params, body, etc.

Today navigating from call site to where the paths is defined is not easy.

client.POST('/chat.postMessage')

it would be great if I can right click on /chat.postMessage and select go to definition in vscode and be taken to where it is defined.

Proposal

TRPC uses a proxy approach to enable any property access at run time.

Checklist

@tonyxiao tonyxiao added enhancement New feature or request PRs welcome PRs are welcome to solve this issue! openapi-fetch Relevant to the openapi-fetch library labels Nov 27, 2023
Copy link
Contributor

github-actions bot commented Aug 6, 2024

This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

@github-actions github-actions bot added the stale label Aug 6, 2024
@tonyxiao
Copy link
Author

tonyxiao commented Aug 7, 2024

A related idea is to use client['/chat/message'].POST(). Could be easier for intellisense

@github-actions github-actions bot removed the stale label Aug 7, 2024
@drwpow drwpow self-assigned this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request openapi-fetch Relevant to the openapi-fetch library PRs welcome PRs are welcome to solve this issue!
Projects
None yet
Development

No branches or pull requests

2 participants