File tree Expand file tree Collapse file tree 3 files changed +35
-2
lines changed Expand file tree Collapse file tree 3 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 22
22
},
23
23
"main" : " dist/cjs/index.js" ,
24
24
"module" : " dist/esm/index.js" ,
25
- "types" : " dist/ts/index .d.ts" ,
25
+ "types" : " typings .d.ts" ,
26
26
"files" : [
27
27
" dist/**/*" ,
28
28
" README.md" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ export type Method = 'GET' | 'PUT' | 'POST' | 'DELETE' | 'PATCH' | 'OPTIONS'
2
+
3
+ export type Request = {
4
+ body : string | null
5
+ method : Method
6
+ signal : AbortSignal | null
7
+ url : string
8
+ searchParams ?: string
9
+ }
10
+
11
+ export type ResponseObj = string | object
12
+ export type ResponseFn = ( request : Request ) => ResponseObj
13
+ export type Response = ResponseObj | ResponseFn
14
+
15
+ export type StorybookAddonMockData = {
16
+ url : string
17
+ method : Method
18
+ delay ?: 0 | number
19
+ status : number
20
+ response : Response
21
+ }
22
+
23
+ declare module '@storybook/csf' {
24
+ interface Parameters {
25
+ mockAddonConfigs ?: {
26
+ globalMockData ?: StorybookAddonMockData [ ]
27
+ ignoreQueryParams ?: boolean
28
+ refreshStoryOnUpdate ?: boolean
29
+ disableUsingOriginal ?: boolean
30
+ disable ?: boolean
31
+ }
32
+ mockData ?: StorybookAddonMockData [ ]
33
+ }
34
+ }
You can’t perform that action at this time.
0 commit comments