@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "5.5.0",
3
+ "version": "5.5.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rescript clean",
@@ -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"