@effect-app/vue 4.0.0-beta.169 → 4.0.0-beta.170
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/CHANGELOG.md +8 -0
- package/package.json +2 -2
- package/test/makeClient.test.ts +7 -6
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-app/vue",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.170",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/effect-ts-app/libs/tree/main/packages/vue",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@vueuse/core": "^14.2.1",
|
|
12
12
|
"change-case": "^5.4.4",
|
|
13
13
|
"query-string": "^9.3.1",
|
|
14
|
-
"effect-app": "4.0.0-beta.
|
|
14
|
+
"effect-app": "4.0.0-beta.170"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@effect/atom-vue": "^4.0.0-beta.59",
|
package/test/makeClient.test.ts
CHANGED
|
@@ -36,7 +36,7 @@ it("TaggedRequestFor .moduleName and request .id / .moduleName", () => {
|
|
|
36
36
|
expectTypeOf(invalidates.invalidatesQueries).toBeFunction()
|
|
37
37
|
configureInvalidation<{ Something: typeof Something }>()((_queryKey, { Something }) => {
|
|
38
38
|
// @ts-expect-error commands are intentionally excluded from configured resources
|
|
39
|
-
|
|
39
|
+
void Something.DoSomething
|
|
40
40
|
return []
|
|
41
41
|
})
|
|
42
42
|
|
|
@@ -75,6 +75,7 @@ it("TaggedRequestFor .moduleName and request .id / .moduleName", () => {
|
|
|
75
75
|
expectTypeOf(result).toEqualTypeOf<Exit.Exit<number, never>>()
|
|
76
76
|
return []
|
|
77
77
|
}) {}
|
|
78
|
+
void TypeInferenceWithSuccess
|
|
78
79
|
|
|
79
80
|
class TypeInferenceWithoutSuccess extends SomethingCommand<TypeInferenceWithoutSuccess>()(
|
|
80
81
|
"TypeInferenceWithoutSuccess",
|
|
@@ -110,9 +111,9 @@ it("TaggedRequestFor .moduleName and request .id / .moduleName", () => {
|
|
|
110
111
|
expectTypeOf(resources.Misc.GetSomething2).toEqualTypeOf<typeof Something.GetSomething2>()
|
|
111
112
|
|
|
112
113
|
// @ts-expect-error commands must be filtered from invalidation resources
|
|
113
|
-
|
|
114
|
+
void resources.Something.DoSomething
|
|
114
115
|
// @ts-expect-error non-query values must be filtered from invalidation resources
|
|
115
|
-
|
|
116
|
+
void resources.Misc.value
|
|
116
117
|
|
|
117
118
|
return []
|
|
118
119
|
}) {}
|
|
@@ -120,7 +121,7 @@ it("TaggedRequestFor .moduleName and request .id / .moduleName", () => {
|
|
|
120
121
|
|
|
121
122
|
type WithSuccessInvalidation = NonNullable<typeof TypeInferenceWithSuccess.config.invalidatesQueries>
|
|
122
123
|
// @ts-expect-error input should be required when command payload is non-empty
|
|
123
|
-
|
|
124
|
+
;((_queryKey, _resources) => []) satisfies WithSuccessInvalidation
|
|
124
125
|
})
|
|
125
126
|
|
|
126
127
|
it.skip("query type tests", () => {
|
|
@@ -219,7 +220,7 @@ it.skip("works", () => {
|
|
|
219
220
|
// we have to make sure the Encoded shape of the provided projection schema matches the Encoded Shape of the original codec.
|
|
220
221
|
const projected = client.GetSomething2.project(S.String)
|
|
221
222
|
// @ts-expect-error encoded type mismatch: original encodes to string, S.Number encodes to number
|
|
222
|
-
|
|
223
|
+
client.GetSomething2.project(S.Number)
|
|
223
224
|
const p0 = projected.request(null as any)
|
|
224
225
|
|
|
225
226
|
// struct example: success schema encodes to { a: string | null }
|
|
@@ -227,7 +228,7 @@ it.skip("works", () => {
|
|
|
227
228
|
const projectedStruct = client.GetStructNullable.project(S.Struct({ a: S.NullOr(S.String) }))
|
|
228
229
|
// bad: { a: S.String } has encoded type { a: string } — does not accept null
|
|
229
230
|
// @ts-expect-error encoded type mismatch: original encodes to { a: string | null }, projection expects { a: string }
|
|
230
|
-
|
|
231
|
+
client.GetStructNullable.project(S.Struct({ a: S.String }))
|
|
231
232
|
|
|
232
233
|
const p00 = projected.query(null as any)
|
|
233
234
|
const p = projected.suspense(null as any)
|