https://github.com/flycran/rtk-to-endpoints-vscode
https://github.com/flycran/rtk-to-endpoints-vscode
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/flycran/rtk-to-endpoints-vscode
- Owner: flycran
- Created: 2026-04-29T05:34:21.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-02T09:26:16.000Z (about 1 month ago)
- Last Synced: 2026-05-02T11:10:29.960Z (about 1 month ago)
- Language: TypeScript
- Size: 28.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RTK to Endpoints
A VSCode extension that enables **Go to Definition** from RTK Query hooks directly to endpoint definitions — with **zero configuration**.
## Features
- Press `F12` or `Cmd/Ctrl+Click` on any RTK Query hook to jump directly to its endpoint definition in `createApi`.
- No `tsconfig.json` changes required.
- No need to switch VSCode to workspace TypeScript version.
## Supported Hook Patterns
| Hook | Endpoint |
|------|----------|
| `useGetUserQuery` | `getUser` |
| `useLazyGetUserQuery` | `getUser` |
| `useCreateUserMutation` | `createUser` |
| `useGetUserQueryState` | `getUser` |
| `useGetUserQuerySubscription` | `getUser` |
| `useGetUserInfiniteQuery` | `getUser` |
| `useGetUserInfiniteQueryState` | `getUser` |
| `useGetUserInfiniteQuerySubscription` | `getUser` |
## Usage
Install the extension and start using Go to Definition on your RTK Query hooks immediately.
```ts
const { data } = useGetUserQuery(id)
// ^^^^^^^^^^^^^^^^ F12 → jumps to getUser endpoint
```
## Settings
| Setting | Default | Description |
|---------|---------|-------------|
| `rtkToEndpoints.enabled` | `true` | Enable or disable the plugin |
## Requirements
- VSCode `^1.85.0`
- TypeScript `>=4.0.0` in your project
## License
MIT