File tree Expand file tree Collapse file tree 2 files changed +24
-25
lines changed Expand file tree Collapse file tree 2 files changed +24
-25
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ description: "NuxtOpenFetch provides a set of types to help you with the develop
5
5
6
6
Sometimes you may need to use the types for query params, response body etc. NuxtOpenFetch provides a set of types to help you with this.
7
7
8
- Available type helpers:
8
+ Available type helpers:
9
9
- ` PetsRequestQuery `
10
10
- ` PetsResponse `
11
11
- ` PetsRequestBody `
@@ -21,9 +21,9 @@ type Status = PetsRequestQuery<'findPetsByStatus'>['status']
21
21
const status = ref <Status >(' available' )
22
22
23
23
function transform(data : PetsResponse <' findPetsByStatus' >) {
24
- return data .map (item => ({
25
- ... item ,
26
- inStock: data .status === ' available'
24
+ return data .map (item => ({
25
+ ... item ,
26
+ inStock: data .status === ' available'
27
27
}))
28
28
}
29
29
@@ -35,4 +35,3 @@ const { data } = await usePets('/pet/findByStatus', {
35
35
transform
36
36
})
37
37
```
38
-
Original file line number Diff line number Diff line change @@ -11,42 +11,42 @@ export default defineNuxtConfig({
11
11
'@nuxt/ui' ,
12
12
'@nuxthq/studio' ,
13
13
'nuxt-og-image' ,
14
- 'nuxt-open-fetch'
14
+ 'nuxt-open-fetch' ,
15
15
] ,
16
16
17
17
devtools : {
18
- enabled : true
18
+ enabled : true ,
19
19
} ,
20
20
21
21
site : {
22
- url : 'https://nuxt-open-fetch.vercel.app'
22
+ url : 'https://nuxt-open-fetch.vercel.app' ,
23
23
} ,
24
24
25
25
colorMode : {
26
- disableTransition : true
26
+ disableTransition : true ,
27
27
} ,
28
28
29
29
routeRules : {
30
- '/api/search.json' : { prerender : true }
30
+ '/api/search.json' : { prerender : true } ,
31
31
} ,
32
32
33
33
future : {
34
- compatibilityVersion : 4
34
+ compatibilityVersion : 4 ,
35
35
} ,
36
36
37
37
compatibilityDate : '2024-07-11' ,
38
38
39
39
nitro : {
40
40
prerender : {
41
41
routes : [
42
- '/'
42
+ '/' ,
43
43
] ,
44
- crawlLinks : true
45
- }
44
+ crawlLinks : true ,
45
+ } ,
46
46
} ,
47
47
48
48
typescript : {
49
- strict : false
49
+ strict : false ,
50
50
} ,
51
51
52
52
hooks : {
@@ -55,32 +55,32 @@ export default defineNuxtConfig({
55
55
const globals = components . filter ( c => [ 'UButton' , 'UIcon' ] . includes ( c . pascalName ) )
56
56
57
57
globals . forEach ( c => c . global = true )
58
- }
58
+ } ,
59
59
} ,
60
60
61
61
eslint : {
62
62
config : {
63
63
stylistic : {
64
64
commaDangle : 'never' ,
65
- braceStyle : '1tbs'
66
- }
67
- }
65
+ braceStyle : '1tbs' ,
66
+ } ,
67
+ } ,
68
68
} ,
69
69
70
70
openFetch : {
71
71
disableNitroPlugin : true ,
72
72
clients : {
73
73
pets : {
74
- baseURL : '/petsProxy'
75
- }
76
- }
74
+ baseURL : '/petsProxy' ,
75
+ } ,
76
+ } ,
77
77
} ,
78
78
79
79
twoslash : {
80
80
floatingVueOptions : {
81
- classMarkdown : 'prose prose-primary dark:prose-invert'
81
+ classMarkdown : 'prose prose-primary dark:prose-invert' ,
82
82
} ,
83
83
throws : false ,
84
- includeNuxtTypes : true
85
- }
84
+ includeNuxtTypes : true ,
85
+ } ,
86
86
} )
You can’t perform that action at this time.
0 commit comments