Skip to content

Commit 8b38734

Browse files
docs(vue): change query keys example to typescript (#9907)
* docs(vue): change query keys example to typescript This example is written in Javascript, and the fact that `todoId` is a `Ref` is a bit hard to identify. I propose to migrate this example to Typescript, with an import to Vue's Ref type and make the parameter to the example composable explicit. There are more docs that could be improved this way, if it suits you I could also make the changes to these docs :) * ci: apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 6799395 commit 8b38734

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/framework/vue/guides/query-keys.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ ref: docs/framework/react/guides/query-keys.md
66

77
[//]: # 'Example5'
88

9-
```js
10-
function useTodos(todoId) {
9+
```ts
10+
import type { Ref } from 'vue'
11+
12+
function useTodos(todoId: Ref<string>) {
1113
const queryKey = ['todos', todoId]
1214
return useQuery({
1315
queryKey,

0 commit comments

Comments
 (0)