File tree Expand file tree Collapse file tree 3 files changed +43
-2
lines changed Expand file tree Collapse file tree 3 files changed +43
-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
+ type JSONValue = string | number | boolean | JSONObject | JSONArray
2
+ type JSONArray = Array < JSONValue >
3
+ interface JSONObject {
4
+ [ x : string ] : JSONValue
5
+ }
6
+
7
+ export type Method = 'GET' | 'PUT' | 'POST' | 'DELETE' | 'PATCH' | 'OPTIONS'
8
+
9
+ export type Request = {
10
+ body : string | null
11
+ method : Method
12
+ signal : AbortSignal | null
13
+ url : string
14
+ searchParams ?: string
15
+ }
16
+
17
+ export type ResponseObj = JSONObject | JSONArray
18
+ export type ResponseFn = ( request : Request ) => JSONValue
19
+ export type Response = ResponseObj | ResponseFn
20
+
21
+ export type StorybookAddonMockData = {
22
+ url : string
23
+ /** @default GET */
24
+ method : Method
25
+ /** @default 0 */
26
+ delay ?: number
27
+ status : number
28
+ response : Response
29
+ }
30
+
31
+ declare module '@storybook/csf' {
32
+ interface Parameters {
33
+ mockAddonConfigs ?: {
34
+ globalMockData ?: StorybookAddonMockData [ ]
35
+ ignoreQueryParams ?: boolean
36
+ refreshStoryOnUpdate ?: boolean
37
+ disableUsingOriginal ?: boolean
38
+ disable ?: boolean
39
+ }
40
+ mockData ?: StorybookAddonMockData [ ]
41
+ }
42
+ }
You can’t perform that action at this time.
0 commit comments