@colisweb/rescript-toolkit 5.5.0 → 5.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/vendors/Swr.res +7 -0
package/package.json
CHANGED
package/src/vendors/Swr.res
CHANGED
|
@@ -63,6 +63,11 @@ type mutationFetcher<'params, 'data, 'error> = {
|
|
|
63
63
|
|
|
64
64
|
module SwrKey = Toolkit__Identifier.MakeString()
|
|
65
65
|
|
|
66
|
+
@unboxed
|
|
67
|
+
type key =
|
|
68
|
+
| String(string)
|
|
69
|
+
| Array(array<string>)
|
|
70
|
+
|
|
66
71
|
@module("swr")
|
|
67
72
|
external useSwr: (option<SwrKey.t>, 'fn, 'fetcherOptions) => fetcher<'data> = "default"
|
|
68
73
|
|
|
@@ -88,6 +93,8 @@ module SwrConfig = {
|
|
|
88
93
|
|
|
89
94
|
@send
|
|
90
95
|
external mutate0: (t, SwrKey.t) => unit = "mutate"
|
|
96
|
+
@send
|
|
97
|
+
external mutateByKey: (t, key) => unit = "mutate"
|
|
91
98
|
|
|
92
99
|
@send
|
|
93
100
|
external mutate: (t, SwrKey.t, 'data, bool) => unit = "mutate"
|