effect-app 4.0.0-beta.27 → 4.0.0-beta.271
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 +1269 -0
- package/dist/Array.d.ts +2 -1
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +4 -4
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Config/SecretURL.d.ts +3 -1
- package/dist/Config/SecretURL.d.ts.map +1 -1
- package/dist/Config/SecretURL.js +3 -6
- package/dist/Config/internal/configSecretURL.d.ts.map +1 -1
- package/dist/Config/internal/configSecretURL.js +2 -2
- package/dist/Config.d.ts +2 -0
- package/dist/Config.d.ts.map +1 -0
- package/dist/Config.js +8 -0
- package/dist/ConfigProvider.d.ts +2 -0
- package/dist/ConfigProvider.d.ts.map +1 -0
- package/dist/ConfigProvider.js +6 -0
- package/dist/{ServiceMap.d.ts → Context.d.ts} +18 -20
- package/dist/Context.d.ts.map +1 -0
- package/dist/Context.js +67 -0
- package/dist/Effect.d.ts +10 -9
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +5 -8
- package/dist/Emailer.d.ts +51 -0
- package/dist/Emailer.d.ts.map +1 -0
- package/dist/Emailer.js +7 -0
- package/dist/Function.d.ts.map +1 -1
- package/dist/Layer.d.ts +10 -6
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +3 -2
- package/dist/Model/Repository/Registry.d.ts +22 -0
- package/dist/Model/Repository/Registry.d.ts.map +1 -0
- package/dist/Model/Repository/Registry.js +18 -0
- package/dist/Model/Repository/ext.d.ts +60 -0
- package/dist/Model/Repository/ext.d.ts.map +1 -0
- package/dist/Model/Repository/ext.js +122 -0
- package/dist/Model/Repository/internal/internal.d.ts +63 -0
- package/dist/Model/Repository/internal/internal.d.ts.map +1 -0
- package/dist/Model/Repository/internal/internal.js +430 -0
- package/dist/Model/Repository/legacy.d.ts +21 -0
- package/dist/Model/Repository/legacy.d.ts.map +1 -0
- package/dist/Model/Repository/legacy.js +2 -0
- package/dist/Model/Repository/makeRepo.d.ts +54 -0
- package/dist/Model/Repository/makeRepo.d.ts.map +1 -0
- package/dist/Model/Repository/makeRepo.js +27 -0
- package/dist/Model/Repository/service.d.ts +121 -0
- package/dist/Model/Repository/service.d.ts.map +1 -0
- package/dist/Model/Repository/service.js +2 -0
- package/dist/Model/Repository/validation.d.ts +58 -0
- package/dist/Model/Repository/validation.d.ts.map +1 -0
- package/dist/Model/Repository/validation.js +32 -0
- package/dist/Model/Repository.d.ts +7 -0
- package/dist/Model/Repository.d.ts.map +1 -0
- package/dist/Model/Repository.js +7 -0
- package/dist/Model/dsl.d.ts +33 -0
- package/dist/Model/dsl.d.ts.map +1 -0
- package/dist/Model/dsl.js +43 -0
- package/dist/Model/filter/filterApi.d.ts +30 -0
- package/dist/Model/filter/filterApi.d.ts.map +1 -0
- package/dist/Model/filter/filterApi.js +2 -0
- package/dist/Model/filter/types/errors.d.ts +29 -0
- package/dist/Model/filter/types/errors.d.ts.map +1 -0
- package/dist/Model/filter/types/errors.js +2 -0
- package/dist/Model/filter/types/fields.d.ts +15 -0
- package/dist/Model/filter/types/fields.d.ts.map +1 -0
- package/dist/Model/filter/types/fields.js +2 -0
- package/dist/Model/filter/types/path/common.d.ts +316 -0
- package/dist/Model/filter/types/path/common.d.ts.map +1 -0
- package/dist/Model/filter/types/path/common.js +2 -0
- package/dist/Model/filter/types/path/eager.d.ts +94 -0
- package/dist/Model/filter/types/path/eager.d.ts.map +1 -0
- package/dist/Model/filter/types/path/eager.js +36 -0
- package/dist/Model/filter/types/path/index.d.ts +4 -0
- package/dist/Model/filter/types/path/index.d.ts.map +1 -0
- package/dist/Model/filter/types/path/index.js +3 -0
- package/dist/Model/filter/types/utils.d.ts +79 -0
- package/dist/Model/filter/types/utils.d.ts.map +1 -0
- package/dist/Model/filter/types/utils.js +2 -0
- package/dist/Model/filter/types/validator.d.ts +30 -0
- package/dist/Model/filter/types/validator.d.ts.map +1 -0
- package/dist/Model/filter/types/validator.js +2 -0
- package/dist/Model/filter/types.d.ts +5 -0
- package/dist/Model/filter/types.d.ts.map +1 -0
- package/dist/Model/filter/types.js +7 -0
- package/dist/Model/query/dsl.d.ts +493 -0
- package/dist/Model/query/dsl.d.ts.map +1 -0
- package/dist/Model/query/dsl.js +376 -0
- package/dist/Model/query/new-kid-interpreter.d.ts +136 -0
- package/dist/Model/query/new-kid-interpreter.d.ts.map +1 -0
- package/dist/Model/query/new-kid-interpreter.js +336 -0
- package/dist/Model/query.d.ts +15 -0
- package/dist/Model/query.d.ts.map +1 -0
- package/dist/Model/query.js +3 -0
- package/dist/Model.d.ts +5 -0
- package/dist/Model.d.ts.map +1 -0
- package/dist/Model.js +5 -0
- package/dist/NonEmptySet.d.ts +3 -1
- package/dist/NonEmptySet.d.ts.map +1 -1
- package/dist/NonEmptySet.js +2 -2
- package/dist/Option.d.ts +1 -0
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +3 -1
- package/dist/Pure.d.ts +7 -5
- package/dist/Pure.d.ts.map +1 -1
- package/dist/Pure.js +17 -14
- package/dist/QueueMaker.d.ts +13 -0
- package/dist/QueueMaker.d.ts.map +1 -0
- package/dist/QueueMaker.js +4 -0
- package/dist/RequestContext.d.ts +208 -0
- package/dist/RequestContext.d.ts.map +1 -0
- package/dist/RequestContext.js +54 -0
- package/dist/Schema/Class.d.ts +157 -19
- package/dist/Schema/Class.d.ts.map +1 -1
- package/dist/Schema/Class.js +214 -17
- package/dist/Schema/FastCheck.d.ts.map +1 -1
- package/dist/Schema/SchemaParser.d.ts +5 -0
- package/dist/Schema/SchemaParser.d.ts.map +1 -0
- package/dist/Schema/SchemaParser.js +6 -0
- package/dist/Schema/SpecialJsonSchema.d.ts +34 -0
- package/dist/Schema/SpecialJsonSchema.d.ts.map +1 -0
- package/dist/Schema/SpecialJsonSchema.js +118 -0
- package/dist/Schema/SpecialOpenApi.d.ts +32 -0
- package/dist/Schema/SpecialOpenApi.d.ts.map +1 -0
- package/dist/Schema/SpecialOpenApi.js +123 -0
- package/dist/Schema/brand.d.ts +4 -2
- package/dist/Schema/brand.d.ts.map +1 -1
- package/dist/Schema/brand.js +3 -1
- package/dist/Schema/email.d.ts.map +1 -1
- package/dist/Schema/email.js +7 -4
- package/dist/Schema/ext.d.ts +338 -55
- package/dist/Schema/ext.d.ts.map +1 -1
- package/dist/Schema/ext.js +358 -53
- package/dist/Schema/moreStrings.d.ts +82 -36
- package/dist/Schema/moreStrings.d.ts.map +1 -1
- package/dist/Schema/moreStrings.js +49 -42
- package/dist/Schema/numbers.d.ts +34 -21
- package/dist/Schema/numbers.d.ts.map +1 -1
- package/dist/Schema/numbers.js +55 -12
- package/dist/Schema/phoneNumber.d.ts.map +1 -1
- package/dist/Schema/phoneNumber.js +6 -3
- package/dist/Schema/strings.d.ts +18 -4
- package/dist/Schema/strings.d.ts.map +1 -1
- package/dist/Schema/strings.js +1 -5
- package/dist/Schema.d.ts +213 -7
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +190 -11
- package/dist/Set.d.ts +4 -1
- package/dist/Set.d.ts.map +1 -1
- package/dist/Set.js +3 -2
- package/dist/Store.d.ts +170 -0
- package/dist/Store.d.ts.map +1 -0
- package/dist/Store.js +121 -0
- package/dist/_ext/Array.d.ts +1 -1
- package/dist/_ext/Array.d.ts.map +1 -1
- package/dist/_ext/Array.js +4 -2
- package/dist/_ext/misc.d.ts +4 -1
- package/dist/_ext/misc.d.ts.map +1 -1
- package/dist/_ext/misc.js +4 -2
- package/dist/_ext/ord.ext.d.ts +2 -1
- package/dist/_ext/ord.ext.d.ts.map +1 -1
- package/dist/_ext/ord.ext.js +2 -2
- package/dist/client/InvalidationKeys.d.ts +29 -0
- package/dist/client/InvalidationKeys.d.ts.map +1 -0
- package/dist/client/InvalidationKeys.js +33 -0
- package/dist/client/apiClientFactory.d.ts +19 -31
- package/dist/client/apiClientFactory.d.ts.map +1 -1
- package/dist/client/apiClientFactory.js +104 -34
- package/dist/client/clientFor.d.ts +52 -18
- package/dist/client/clientFor.d.ts.map +1 -1
- package/dist/client/clientFor.js +9 -1
- package/dist/client/errors.d.ts +82 -27
- package/dist/client/errors.d.ts.map +1 -1
- package/dist/client/errors.js +75 -19
- package/dist/client/makeClient.d.ts +494 -32
- package/dist/client/makeClient.d.ts.map +1 -1
- package/dist/client/makeClient.js +66 -24
- package/dist/client.d.ts +1 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -1
- package/dist/faker.d.ts.map +1 -1
- package/dist/http/Request.d.ts +1 -1
- package/dist/http/Request.d.ts.map +1 -1
- package/dist/http/Request.js +2 -2
- package/dist/ids.d.ts +42 -14
- package/dist/ids.d.ts.map +1 -1
- package/dist/ids.js +30 -5
- package/dist/index.d.ts +6 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/middleware.d.ts +13 -7
- package/dist/middleware.d.ts.map +1 -1
- package/dist/middleware.js +14 -8
- package/dist/rpc/Invalidation.d.ts +420 -0
- package/dist/rpc/Invalidation.d.ts.map +1 -0
- package/dist/rpc/Invalidation.js +168 -0
- package/dist/rpc/MiddlewareMaker.d.ts +11 -7
- package/dist/rpc/MiddlewareMaker.d.ts.map +1 -1
- package/dist/rpc/MiddlewareMaker.js +59 -38
- package/dist/rpc/RpcContextMap.d.ts +3 -3
- package/dist/rpc/RpcContextMap.d.ts.map +1 -1
- package/dist/rpc/RpcContextMap.js +4 -4
- package/dist/rpc/RpcMiddleware.d.ts +14 -10
- package/dist/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/rpc/RpcMiddleware.js +1 -1
- package/dist/rpc.d.ts +1 -1
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +2 -2
- package/dist/runtime.d.ts +19 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +40 -0
- package/dist/setupRequest.d.ts +19 -0
- package/dist/setupRequest.d.ts.map +1 -0
- package/dist/setupRequest.js +69 -0
- package/dist/toast.d.ts +51 -0
- package/dist/toast.d.ts.map +1 -0
- package/dist/toast.js +34 -0
- package/dist/transform.d.ts +1 -1
- package/dist/transform.d.ts.map +1 -1
- package/dist/transform.js +4 -5
- package/dist/utils/effectify.d.ts +1 -1
- package/dist/utils/effectify.d.ts.map +1 -1
- package/dist/utils/effectify.js +2 -2
- package/dist/utils/extend.d.ts.map +1 -1
- package/dist/utils/gen.d.ts +4 -4
- package/dist/utils/gen.d.ts.map +1 -1
- package/dist/utils/logLevel.d.ts +2 -2
- package/dist/utils/logLevel.d.ts.map +1 -1
- package/dist/utils/logger.d.ts +4 -3
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +4 -4
- package/dist/utils.d.ts +34 -39
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +33 -37
- package/dist/validation/validators.d.ts.map +1 -1
- package/dist/validation.d.ts.map +1 -1
- package/dist/withToast.d.ts +30 -0
- package/dist/withToast.d.ts.map +1 -0
- package/dist/withToast.js +64 -0
- package/package.json +22 -247
- package/src/Array.ts +5 -5
- package/src/Chunk.ts +3 -3
- package/src/Config/SecretURL.ts +6 -3
- package/src/Config/internal/configSecretURL.ts +2 -2
- package/src/Config.ts +7 -0
- package/src/ConfigProvider.ts +5 -0
- package/src/{ServiceMap.ts → Context.ts} +56 -63
- package/src/Effect.ts +14 -16
- package/src/Emailer.ts +51 -0
- package/src/Inputify.type.ts +1 -1
- package/src/Layer.ts +11 -7
- package/src/Model/Repository/Registry.ts +35 -0
- package/src/Model/Repository/ext.ts +375 -0
- package/src/Model/Repository/internal/internal.ts +741 -0
- package/src/Model/Repository/legacy.ts +29 -0
- package/src/Model/Repository/makeRepo.ts +145 -0
- package/src/Model/Repository/service.ts +676 -0
- package/src/Model/Repository/validation.ts +31 -0
- package/src/Model/Repository.ts +6 -0
- package/src/Model/dsl.ts +129 -0
- package/src/Model/filter/filterApi.ts +60 -0
- package/src/Model/filter/types/errors.ts +47 -0
- package/src/Model/filter/types/fields.ts +50 -0
- package/src/Model/filter/types/path/common.ts +404 -0
- package/src/Model/filter/types/path/eager.ts +329 -0
- package/src/Model/filter/types/path/index.ts +4 -0
- package/src/Model/filter/types/utils.ts +128 -0
- package/src/Model/filter/types/validator.ts +46 -0
- package/src/Model/filter/types.ts +6 -0
- package/src/Model/query/dsl.ts +2694 -0
- package/src/Model/query/new-kid-interpreter.ts +484 -0
- package/src/Model/query.ts +13 -0
- package/src/Model.ts +4 -0
- package/src/NonEmptySet.ts +6 -4
- package/src/Option.ts +2 -0
- package/src/Pure.ts +22 -20
- package/src/QueueMaker.ts +19 -0
- package/src/RequestContext.ts +95 -0
- package/src/Schema/Class.ts +517 -59
- package/src/Schema/SchemaParser.ts +12 -0
- package/src/Schema/SpecialJsonSchema.ts +139 -0
- package/src/Schema/SpecialOpenApi.ts +130 -0
- package/src/Schema/brand.ts +22 -2
- package/src/Schema/email.ts +9 -4
- package/src/Schema/ext.ts +446 -91
- package/src/Schema/moreStrings.ts +147 -68
- package/src/Schema/numbers.ts +97 -28
- package/src/Schema/phoneNumber.ts +9 -5
- package/src/Schema/strings.ts +23 -14
- package/src/Schema.ts +389 -25
- package/src/Set.ts +6 -2
- package/src/Store.ts +277 -0
- package/src/_ext/Array.ts +4 -2
- package/src/_ext/misc.ts +4 -1
- package/src/_ext/ord.ext.ts +2 -1
- package/src/client/InvalidationKeys.ts +50 -0
- package/src/client/apiClientFactory.ts +234 -135
- package/src/client/clientFor.ts +105 -34
- package/src/client/errors.ts +100 -29
- package/src/client/makeClient.ts +594 -73
- package/src/client.ts +5 -4
- package/src/http/Request.ts +3 -3
- package/src/http.ts +1 -1
- package/src/ids.ts +33 -6
- package/src/index.ts +20 -23
- package/src/middleware.ts +13 -9
- package/src/rpc/Invalidation.ts +261 -0
- package/src/rpc/MiddlewareMaker.ts +88 -80
- package/src/rpc/README.md +2 -2
- package/src/rpc/RpcContextMap.ts +7 -6
- package/src/rpc/RpcMiddleware.ts +19 -13
- package/src/rpc.ts +4 -4
- package/src/runtime.ts +56 -0
- package/src/setupRequest.ts +134 -0
- package/src/toast.ts +54 -0
- package/src/transform.ts +4 -4
- package/src/utils/effectify.ts +1 -1
- package/src/utils/gen.ts +8 -8
- package/src/utils/logLevel.ts +1 -1
- package/src/utils/logger.ts +4 -3
- package/src/utils.ts +85 -158
- package/src/validation.ts +2 -2
- package/src/withToast.ts +133 -0
- package/test/dist/rpc.test.d.ts.map +1 -1
- package/test/dist/secretURL.test.d.ts.map +1 -0
- package/test/dist/special.test.d.ts.map +1 -0
- package/test/moreStrings.test.ts +1 -1
- package/test/rpc.test.ts +46 -6
- package/test/schema.test.ts +459 -30
- package/test/secretURL.test.ts +160 -0
- package/test/special.test.ts +1026 -0
- package/test/utils.test.ts +7 -7
- package/tsconfig.base.json +6 -5
- package/tsconfig.json +3 -1
- package/tsconfig.json.bak +2 -2
- package/tsconfig.src.json +29 -29
- package/tsconfig.test.json +2 -2
- package/dist/Operations.d.ts +0 -123
- package/dist/Operations.d.ts.map +0 -1
- package/dist/Operations.js +0 -29
- package/dist/ServiceMap.d.ts.map +0 -1
- package/dist/ServiceMap.js +0 -91
- package/eslint.config.mjs +0 -26
- package/src/Operations.ts +0 -55
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import { expectTypeOf } from "@effect/vitest"
|
|
3
|
+
import type { FieldValues } from "../fields.ts"
|
|
4
|
+
import type { BrowserNativeObject, Equals, IsLiteral, IsNever, Primitive } from "../utils.ts"
|
|
5
|
+
|
|
6
|
+
import type { ArrayKey, IsTuple, TupleKeys } from "./common.ts"
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Helper type for recursively constructing paths through a type.
|
|
10
|
+
* `Seen` carries the set of object types already entered on this branch so
|
|
11
|
+
* recursion terminates on self-referential types (see {@link Path}).
|
|
12
|
+
*/
|
|
13
|
+
type PathImpl<K extends string | number, V, Seen> = V extends
|
|
14
|
+
| Primitive
|
|
15
|
+
| BrowserNativeObject ? `${K}`
|
|
16
|
+
// Stop before re-entering a type already on this branch. Recursive types
|
|
17
|
+
// (notably `Json`, the encoded form of `Schema.Defect()`:
|
|
18
|
+
// `JsonObject = { [x: string]: Json }`) would otherwise descend forever and
|
|
19
|
+
// blow past TS's instantiation limit => TS2589. The key itself stays a valid
|
|
20
|
+
// leaf path; only the unbounded descent is cut.
|
|
21
|
+
: [V] extends [Seen] ? `${K}`
|
|
22
|
+
: `${K}` | `${K}.${Path<V, Seen | V>}`
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Type which eagerly collects all paths through a type
|
|
26
|
+
* @typeParam T - type which should be introspected
|
|
27
|
+
* @typeParam Seen - object types already entered on this recursion branch;
|
|
28
|
+
* used to terminate on self-referential types
|
|
29
|
+
* @example
|
|
30
|
+
* ```
|
|
31
|
+
* Path<{foo: {bar: string}}> = 'foo' | 'foo.bar'
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export type Path<T, Seen = never> = T extends ReadonlyArray<infer V> ? IsTuple<T> extends true ? {
|
|
35
|
+
[K in TupleKeys<T>]-?: PathImpl<K & string, T[K], Seen> | "length"
|
|
36
|
+
}[TupleKeys<T>]
|
|
37
|
+
: PathImpl<ArrayKey, V, Seen | T> | "length"
|
|
38
|
+
: {
|
|
39
|
+
[K in keyof T]-?: PathImpl<K & string, T[K], Seen | T>
|
|
40
|
+
}[keyof T]
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* See {@link Path}
|
|
44
|
+
*/
|
|
45
|
+
export type FieldPath<TFieldValues extends FieldValues> = Path<TFieldValues>
|
|
46
|
+
|
|
47
|
+
{
|
|
48
|
+
// Regression: self-referential types must terminate instead of blowing past
|
|
49
|
+
// TS's instantiation limit (TS2589). `JsonLike` mirrors effect's `Json` — the
|
|
50
|
+
// encoded form of `Schema.Defect()` — whose `{ [x: string]: Json }` index
|
|
51
|
+
// signature previously made `Path` recurse forever. These aliases failing to
|
|
52
|
+
// compile (rather than resolving to a string union) signals the regression.
|
|
53
|
+
type JsonLike =
|
|
54
|
+
| string
|
|
55
|
+
| number
|
|
56
|
+
| boolean
|
|
57
|
+
| null
|
|
58
|
+
| ReadonlyArray<JsonLike>
|
|
59
|
+
| { readonly [x: string]: JsonLike }
|
|
60
|
+
type _RawDefect = Path<{ id: string; raw: JsonLike }>
|
|
61
|
+
type _NestedDefect = Path<{ a: { b: { error: { raw: JsonLike } } } }>
|
|
62
|
+
type _ArrayOfDefect = Path<{ items: ReadonlyArray<{ raw: JsonLike }> }>
|
|
63
|
+
// finite paths are still produced
|
|
64
|
+
expectTypeOf<"id">().toExtend<_RawDefect>()
|
|
65
|
+
expectTypeOf<"raw">().toExtend<_RawDefect>()
|
|
66
|
+
expectTypeOf<"a.b.error.raw">().toExtend<_NestedDefect>()
|
|
67
|
+
expectTypeOf<`items.${number}.raw`>().toExtend<_ArrayOfDefect>()
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Type to evaluate the type which the given path points to.
|
|
72
|
+
* @typeParam T - deeply nested type which is indexed by the path
|
|
73
|
+
* @typeParam P - path into the deeply nested type
|
|
74
|
+
* @example
|
|
75
|
+
* ```
|
|
76
|
+
* PathValue<{foo: {bar: string}}, 'foo.bar'> = string
|
|
77
|
+
* PathValue<[number, string], '1'> = string
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
/* dprint-ignore-start */
|
|
81
|
+
export type PathValue<T, P extends Path<T>> =
|
|
82
|
+
T extends any
|
|
83
|
+
? P extends `${infer K}.${infer R}`
|
|
84
|
+
? K extends keyof T
|
|
85
|
+
? R extends Path<T[K]>
|
|
86
|
+
? PathValue<T[K], R>
|
|
87
|
+
: never
|
|
88
|
+
: K extends `${ArrayKey}`
|
|
89
|
+
? T extends ReadonlyArray<infer V>
|
|
90
|
+
? PathValue<V, R & Path<V>>
|
|
91
|
+
: never
|
|
92
|
+
: never
|
|
93
|
+
: P extends keyof T
|
|
94
|
+
? T[P]
|
|
95
|
+
: P extends `${ArrayKey}`
|
|
96
|
+
? T extends ReadonlyArray<infer V>
|
|
97
|
+
? V
|
|
98
|
+
: never
|
|
99
|
+
: never
|
|
100
|
+
: never
|
|
101
|
+
/* dprint-ignore-end */
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* See {@link PathValue}
|
|
105
|
+
*/
|
|
106
|
+
export type FieldPathValue<
|
|
107
|
+
TFieldValues extends FieldValues,
|
|
108
|
+
TFieldPath extends FieldPath<TFieldValues>
|
|
109
|
+
> = PathValue<TFieldValues, TFieldPath>
|
|
110
|
+
|
|
111
|
+
/* dprint-ignore-start */
|
|
112
|
+
export type SetPathValue<T, P extends Path<T>, X> =
|
|
113
|
+
T extends any
|
|
114
|
+
? P extends `${infer K}.${infer R}`
|
|
115
|
+
? K extends keyof T
|
|
116
|
+
? R extends Path<T[K]>
|
|
117
|
+
? { [_ in keyof T]: _ extends K ? SetPathValue<T[K], R, X> : T[_] }
|
|
118
|
+
: never
|
|
119
|
+
: K extends `${ArrayKey}`
|
|
120
|
+
? T extends ReadonlyArray<infer V>
|
|
121
|
+
? { [_ in keyof T]: SetPathValue<V, R & Path<V>, X> }
|
|
122
|
+
: never
|
|
123
|
+
: never
|
|
124
|
+
: P extends keyof T
|
|
125
|
+
? { [_ in keyof T]: _ extends P ? X : T[_] }
|
|
126
|
+
: P extends `${ArrayKey}`
|
|
127
|
+
? T extends ReadonlyArray<any>
|
|
128
|
+
? { [_ in keyof T]: X }
|
|
129
|
+
: never
|
|
130
|
+
: never
|
|
131
|
+
: never
|
|
132
|
+
/* dprint-ignore-end */
|
|
133
|
+
|
|
134
|
+
export type SetFieldPathValue<
|
|
135
|
+
TFieldValues extends FieldValues,
|
|
136
|
+
TFieldPath extends FieldPath<TFieldValues>,
|
|
137
|
+
X
|
|
138
|
+
> = SetPathValue<TFieldValues, TFieldPath, X>
|
|
139
|
+
|
|
140
|
+
/* dprint-ignore-start */
|
|
141
|
+
export type RefinePathValue<T, P extends Path<T>, X extends string | number | boolean | null | bigint, Exclde extends boolean = false> =
|
|
142
|
+
T extends any
|
|
143
|
+
// recursive cases
|
|
144
|
+
? P extends `${infer K}.${infer R}`
|
|
145
|
+
? K extends keyof T
|
|
146
|
+
? R extends Path<T[K]>
|
|
147
|
+
? { [_ in keyof T]: _ extends K ? RefinePathValue<T[K], R, X, Exclde> : T[_] }
|
|
148
|
+
: never
|
|
149
|
+
: K extends `${ArrayKey}`
|
|
150
|
+
? T extends ReadonlyArray<infer V>
|
|
151
|
+
? { [_ in keyof T]: RefinePathValue<V, R & Path<V>, X, Exclde> }
|
|
152
|
+
: never
|
|
153
|
+
: never
|
|
154
|
+
// base cases
|
|
155
|
+
: P extends keyof T
|
|
156
|
+
? X extends T[P]
|
|
157
|
+
? ({ [_ in keyof T]: _ extends P
|
|
158
|
+
? Equals<
|
|
159
|
+
Exclde,
|
|
160
|
+
true,
|
|
161
|
+
Exclude<T[_], X>,
|
|
162
|
+
IsLiteral<T[_], X, Equals<X, null, null, NonNullable<T[_]>>>
|
|
163
|
+
>
|
|
164
|
+
: T[_]
|
|
165
|
+
}) extends infer $T
|
|
166
|
+
? Equals<IsNever<$T[P & keyof $T]>, true, never, $T>
|
|
167
|
+
: never
|
|
168
|
+
: Equals<Exclde, true, T, never>
|
|
169
|
+
: P extends `${ArrayKey}`
|
|
170
|
+
? T extends ReadonlyArray<infer V>
|
|
171
|
+
? X extends V
|
|
172
|
+
? { [_ in keyof T]: Equals<
|
|
173
|
+
Exclde,
|
|
174
|
+
true,
|
|
175
|
+
Exclude<T[_], X>,
|
|
176
|
+
IsLiteral<T[_], X, Equals<X, null, null, NonNullable<T[_]>>>
|
|
177
|
+
> }
|
|
178
|
+
: never
|
|
179
|
+
: never
|
|
180
|
+
: never
|
|
181
|
+
: never
|
|
182
|
+
/* dprint-ignore-end */
|
|
183
|
+
|
|
184
|
+
export type EraseNeverContainingUnionElements<T> = T extends any ? {
|
|
185
|
+
[K in keyof T]: IsNever<T[K]> extends true ? true : false
|
|
186
|
+
} extends infer $NC ? true extends $NC[keyof $NC] ? never : T
|
|
187
|
+
: never : never
|
|
188
|
+
|
|
189
|
+
export type RefineFieldPathValue<
|
|
190
|
+
TFieldValues extends FieldValues,
|
|
191
|
+
TFieldPath extends FieldPath<TFieldValues>,
|
|
192
|
+
X extends string | number | boolean | null | bigint,
|
|
193
|
+
Exclde extends boolean = false
|
|
194
|
+
> = EraseNeverContainingUnionElements<RefinePathValue<TFieldValues, TFieldPath, X, Exclde>>
|
|
195
|
+
|
|
196
|
+
{
|
|
197
|
+
type test1 = RefineFieldPathValue<{ a: { b: "tag1"; v1: string } | { b: "tag2"; v2: number } }, "a.b", "tag1">
|
|
198
|
+
expectTypeOf<test1>().toEqualTypeOf<{ a: { b: "tag1"; v1: string } }>()
|
|
199
|
+
|
|
200
|
+
type test2 = RefineFieldPathValue<{ b: "tag1"; v1: string } | { b: "tag2"; v2: number }, "b", "tag1">
|
|
201
|
+
expectTypeOf<test2>().toEqualTypeOf<{ b: "tag1"; v1: string }>()
|
|
202
|
+
|
|
203
|
+
type test3 = RefineFieldPathValue<{ b: "tag1" | "tag2" }, "b", "tag1">
|
|
204
|
+
expectTypeOf<test3>().toEqualTypeOf<{ b: "tag1" }>()
|
|
205
|
+
|
|
206
|
+
type test4 = RefineFieldPathValue<{ b: ("tag1" | "tag2")[] }, `b.${number}`, "tag1">
|
|
207
|
+
expectTypeOf<test4>().toEqualTypeOf<{ b: "tag1"[] }>()
|
|
208
|
+
|
|
209
|
+
type test5 = RefineFieldPathValue<{ b: "tag1"; v1: unknown } | { b: "tag2"; v2: unknown }, "b", "tag1">
|
|
210
|
+
expectTypeOf<test5>().toEqualTypeOf<{ b: "tag1"; v1: unknown }>()
|
|
211
|
+
|
|
212
|
+
type test6 = RefineFieldPathValue<
|
|
213
|
+
{ a: { b: "tag1"; v1: string } | { b: "tag2"; v2: number } } | { something: "else " },
|
|
214
|
+
"a.b",
|
|
215
|
+
"tag2"
|
|
216
|
+
>
|
|
217
|
+
expectTypeOf<test6>().toEqualTypeOf<{ a: { b: "tag2"; v2: number } }>()
|
|
218
|
+
|
|
219
|
+
type test7 = RefineFieldPathValue<{ b: string | null }, "b", "tag1">
|
|
220
|
+
expectTypeOf<test7>().toEqualTypeOf<{ b: string }>()
|
|
221
|
+
|
|
222
|
+
type test8 = RefineFieldPathValue<{ b: string | null }, "b", null>
|
|
223
|
+
expectTypeOf<test8>().toEqualTypeOf<{ b: null }>()
|
|
224
|
+
|
|
225
|
+
type test1E = RefineFieldPathValue<{ a: { b: "tag1"; v1: string } | { b: "tag2"; v2: number } }, "a.b", "tag1", true>
|
|
226
|
+
expectTypeOf<test1E>().toEqualTypeOf<{ a: { b: "tag2"; v2: number } }>()
|
|
227
|
+
|
|
228
|
+
type test2E = RefineFieldPathValue<{ b: "tag1"; v1: string } | { b: "tag2"; v2: number }, "b", "tag2", true>
|
|
229
|
+
expectTypeOf<test2E>().toEqualTypeOf<{ b: "tag1"; v1: string }>()
|
|
230
|
+
|
|
231
|
+
type test3E = RefineFieldPathValue<{ b: "tag1" | "tag2" | null }, "b", null, true>
|
|
232
|
+
expectTypeOf<test3E>().toEqualTypeOf<{ b: "tag1" | "tag2" }>()
|
|
233
|
+
|
|
234
|
+
type test4E = RefineFieldPathValue<{ b: ("tag1" | "tag2")[] }, `b.${number}`, "tag1", true>
|
|
235
|
+
expectTypeOf<test4E>().toEqualTypeOf<{ b: "tag2"[] }>()
|
|
236
|
+
|
|
237
|
+
type test5E = RefineFieldPathValue<{ b: "tag1"; v1: unknown } | { b: "tag2"; v2: unknown }, "b", "tag1", true>
|
|
238
|
+
expectTypeOf<test5E>().toEqualTypeOf<{ b: "tag2"; v2: unknown }>()
|
|
239
|
+
|
|
240
|
+
type test6E = RefineFieldPathValue<
|
|
241
|
+
{ a: { b: "tag1"; v1: string } | { b: "tag2"; v2: number } } | { something: "else " },
|
|
242
|
+
"a.b",
|
|
243
|
+
"tag2",
|
|
244
|
+
true
|
|
245
|
+
>
|
|
246
|
+
expectTypeOf<test6E>().toEqualTypeOf<{ a: { b: "tag1"; v1: string } }>()
|
|
247
|
+
|
|
248
|
+
type test10 = RefineFieldPathValue<
|
|
249
|
+
| { nested: { a: string; _tag: "a" } | { b: number; _tag: "b" }; _tag: "ab" }
|
|
250
|
+
| { nested: { b: number; _tag: "b" } | { c: boolean; _tag: "c" }; _tag: "bc" },
|
|
251
|
+
"nested._tag",
|
|
252
|
+
"a"
|
|
253
|
+
>
|
|
254
|
+
|
|
255
|
+
expectTypeOf<test10>().toEqualTypeOf<{
|
|
256
|
+
nested: {
|
|
257
|
+
a: string
|
|
258
|
+
_tag: "a"
|
|
259
|
+
}
|
|
260
|
+
_tag: "ab"
|
|
261
|
+
}>()
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
{
|
|
265
|
+
type test1 = SetFieldPathValue<{ foo: { bar: string[] } }, `foo.bar`, boolean>
|
|
266
|
+
expectTypeOf<test1>().toEqualTypeOf<{ foo: { bar: boolean } }>()
|
|
267
|
+
|
|
268
|
+
type test1a = SetFieldPathValue<{ foo: { bar: string[]; baz: 12 } }, `foo.bar`, boolean>
|
|
269
|
+
expectTypeOf<test1a>().toEqualTypeOf<{ foo: { bar: boolean; baz: 12 } }>()
|
|
270
|
+
|
|
271
|
+
type test2 = SetFieldPathValue<{ foo: { bar: string[] } }, `foo.bar.${number}`, boolean>
|
|
272
|
+
expectTypeOf<test2>().toEqualTypeOf<{ foo: { bar: boolean[] } }>()
|
|
273
|
+
|
|
274
|
+
type test2a = SetFieldPathValue<{ foo: { bar: readonly string[]; baz: 3 }; ban: 123 }, `foo.bar.${number}`, boolean>
|
|
275
|
+
expectTypeOf<test2a>().toEqualTypeOf<{ foo: { bar: readonly boolean[]; baz: 3 }; ban: 123 }>()
|
|
276
|
+
|
|
277
|
+
type test2b = SetFieldPathValue<
|
|
278
|
+
{ foo: { bar: readonly { a: 1; b: 2 }[]; baz: 3 }; ban: 123 },
|
|
279
|
+
`foo.bar.${number}.b`,
|
|
280
|
+
"b"
|
|
281
|
+
>
|
|
282
|
+
expectTypeOf<test2b>().toEqualTypeOf<{ foo: { bar: readonly { a: 1; b: "b" }[]; baz: 3 }; ban: 123 }>()
|
|
283
|
+
|
|
284
|
+
type test3 = SetFieldPathValue<{ foo: ["a", "b"] }, `foo.0`, boolean>
|
|
285
|
+
expectTypeOf<test3>().toEqualTypeOf<{ foo: [boolean, "b"] }>()
|
|
286
|
+
|
|
287
|
+
type test3a = SetFieldPathValue<{ foo: [{ a: 123 }, "b"] }, `foo.0.a`, boolean>
|
|
288
|
+
expectTypeOf<test3a>().toEqualTypeOf<{ foo: [{ a: boolean }, "b"] }>()
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Type to evaluate the type which the given paths point to.
|
|
293
|
+
* @typeParam TFieldValues - field values which are indexed by the paths
|
|
294
|
+
* @typeParam TPath - paths into the deeply nested field values
|
|
295
|
+
* @example
|
|
296
|
+
* ```
|
|
297
|
+
* FieldPathValues<{foo: {bar: string}}, ['foo', 'foo.bar']>
|
|
298
|
+
* = [{bar: string}, string]
|
|
299
|
+
* ```
|
|
300
|
+
*/
|
|
301
|
+
export type FieldPathValues<
|
|
302
|
+
TFieldValues extends FieldValues,
|
|
303
|
+
TPath extends FieldPath<TFieldValues>[] | readonly FieldPath<TFieldValues>[]
|
|
304
|
+
> =
|
|
305
|
+
& {}
|
|
306
|
+
& {
|
|
307
|
+
[K in keyof TPath]: FieldPathValue<
|
|
308
|
+
TFieldValues,
|
|
309
|
+
TPath[K] & FieldPath<TFieldValues>
|
|
310
|
+
>
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Type which eagerly collects all paths through a fieldType that matches a give type
|
|
315
|
+
* @typeParam TFieldValues - field values which are indexed by the paths
|
|
316
|
+
* @typeParam TValue - the value you want to match into each type
|
|
317
|
+
* @example
|
|
318
|
+
* ```typescript
|
|
319
|
+
* FieldPathByValue<{foo: {bar: number}, baz: number, bar: string}, number>
|
|
320
|
+
* = 'foo.bar' | 'baz'
|
|
321
|
+
* ```
|
|
322
|
+
*/
|
|
323
|
+
export type FieldPathByValue<TFieldValues extends FieldValues, TValue> = {
|
|
324
|
+
[Key in FieldPath<TFieldValues>]: FieldPathValue<
|
|
325
|
+
TFieldValues,
|
|
326
|
+
Key
|
|
327
|
+
> extends TValue ? Key
|
|
328
|
+
: never
|
|
329
|
+
}[FieldPath<TFieldValues>]
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
declare const $NestedValue: unique symbol
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated to be removed in the next major version
|
|
5
|
+
*/
|
|
6
|
+
export type NestedValue<TValue extends object = object> = {
|
|
7
|
+
[$NestedValue]: never
|
|
8
|
+
} & TValue
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated to be removed in the next major version
|
|
12
|
+
*/
|
|
13
|
+
export type UnpackNestedValue<T> = T extends NestedValue<infer U> ? U
|
|
14
|
+
: T extends Date | FileList | File | Blob ? T
|
|
15
|
+
: T extends object ? { [K in keyof T]: UnpackNestedValue<T[K]> }
|
|
16
|
+
: T
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
Projects that React Hook Form installed don't include the DOM library need these interfaces to compile.
|
|
20
|
+
React Native applications is no DOM available. The JavaScript runtime is ES6/ES2015 only.
|
|
21
|
+
These definitions allow such projects to compile with only --lib ES6.
|
|
22
|
+
|
|
23
|
+
Warning: all of these interfaces are empty.
|
|
24
|
+
If you want type definitions for various properties, you need to add `--lib DOM` (via command line or tsconfig.json).
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
export type Noop = () => void
|
|
28
|
+
|
|
29
|
+
interface File extends Blob {
|
|
30
|
+
readonly lastModified: number
|
|
31
|
+
readonly name: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface FileList {
|
|
35
|
+
readonly length: number
|
|
36
|
+
item(index: number): File | null
|
|
37
|
+
[index: number]: File
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type Primitive =
|
|
41
|
+
| null
|
|
42
|
+
| undefined
|
|
43
|
+
| string
|
|
44
|
+
| number
|
|
45
|
+
| boolean
|
|
46
|
+
| symbol
|
|
47
|
+
| bigint
|
|
48
|
+
|
|
49
|
+
export type BrowserNativeObject = Date | FileList | File
|
|
50
|
+
|
|
51
|
+
export type EmptyObject = { [K in string | number]: never }
|
|
52
|
+
|
|
53
|
+
export type NonUndefined<T> = T extends undefined ? never : T
|
|
54
|
+
|
|
55
|
+
export type LiteralUnion<T extends U, U extends Primitive> =
|
|
56
|
+
| T
|
|
57
|
+
| (U & { _?: never })
|
|
58
|
+
|
|
59
|
+
export type DeepPartial<T> = T extends BrowserNativeObject | NestedValue ? T
|
|
60
|
+
: { [K in keyof T]?: DeepPartial<T[K]> }
|
|
61
|
+
|
|
62
|
+
export type DeepPartialSkipArrayKey<T> = T extends
|
|
63
|
+
| BrowserNativeObject
|
|
64
|
+
| NestedValue ? T
|
|
65
|
+
: T extends ReadonlyArray<any> ? { [K in keyof T]: DeepPartialSkipArrayKey<T[K]> }
|
|
66
|
+
: { [K in keyof T]?: DeepPartialSkipArrayKey<T[K]> }
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Checks whether the type is any
|
|
70
|
+
* See {@link https://stackoverflow.com/a/49928360/3406963}
|
|
71
|
+
* @typeParam T - type which may be any
|
|
72
|
+
* ```
|
|
73
|
+
* IsAny<any> = true
|
|
74
|
+
* IsAny<string> = false
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export type IsAny<T> = 0 extends 1 & T ? true : false
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Checks whether the type is never
|
|
81
|
+
* @typeParam T - type which may be never
|
|
82
|
+
* ```
|
|
83
|
+
* IsAny<never> = true
|
|
84
|
+
* IsAny<string> = false
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
export type IsNever<T> = [T] extends [never] ? true : false
|
|
88
|
+
|
|
89
|
+
export type DeepMap<T, TValue> = IsAny<T> extends true ? any
|
|
90
|
+
: T extends BrowserNativeObject | NestedValue ? TValue
|
|
91
|
+
: T extends object ? { [K in keyof T]: DeepMap<NonUndefined<T[K]>, TValue> }
|
|
92
|
+
: TValue
|
|
93
|
+
|
|
94
|
+
export type IsFlatObject<T extends object> = Extract<
|
|
95
|
+
Exclude<T[keyof T], NestedValue | Date | FileList>,
|
|
96
|
+
any[] | object
|
|
97
|
+
> extends never ? true
|
|
98
|
+
: false
|
|
99
|
+
|
|
100
|
+
export type Merge<A, B> = {
|
|
101
|
+
[K in keyof A | keyof B]?: K extends keyof A & keyof B ? [A[K], B[K]] extends [object, object] ? Merge<A[K], B[K]>
|
|
102
|
+
: A[K] | B[K]
|
|
103
|
+
: K extends keyof A ? A[K]
|
|
104
|
+
: K extends keyof B ? B[K]
|
|
105
|
+
: never
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export type Resolve<T> =
|
|
109
|
+
& {
|
|
110
|
+
[K in keyof T]: Resolve<T[K]>
|
|
111
|
+
}
|
|
112
|
+
& {}
|
|
113
|
+
|
|
114
|
+
export type ResolveFirstLevel<T> =
|
|
115
|
+
& {
|
|
116
|
+
[K in keyof T]: T[K]
|
|
117
|
+
}
|
|
118
|
+
& {}
|
|
119
|
+
|
|
120
|
+
export type Cast<T, U> = T extends U ? T : U
|
|
121
|
+
|
|
122
|
+
export type IsLiteral<T, True, False> = string extends T ? False : number extends T ? False : True
|
|
123
|
+
|
|
124
|
+
export type Extends<T, U, True, False> = T extends U ? True : False
|
|
125
|
+
|
|
126
|
+
export type IsEqual<T, U> = (<_>() => _ extends T ? 1 : 2) extends (<_>() => _ extends U ? 1 : 2) ? true : false
|
|
127
|
+
|
|
128
|
+
export type Equals<T, U, True, False> = IsEqual<T, U> extends true ? True : False
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Message } from "./errors.ts"
|
|
2
|
+
import type { FieldValues, InternalFieldName } from "./fields.ts"
|
|
3
|
+
import type { FieldPath, FieldPathValue } from "./path/index.ts"
|
|
4
|
+
|
|
5
|
+
export type ValidationValue = boolean | number | string | RegExp
|
|
6
|
+
|
|
7
|
+
export type ValidationRule<
|
|
8
|
+
TValidationValue extends ValidationValue = ValidationValue
|
|
9
|
+
> = TValidationValue | ValidationValueMessage<TValidationValue>
|
|
10
|
+
|
|
11
|
+
export type ValidationValueMessage<
|
|
12
|
+
TValidationValue extends ValidationValue = ValidationValue
|
|
13
|
+
> = {
|
|
14
|
+
value: TValidationValue
|
|
15
|
+
message: Message
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type ValidateResult = Message | Message[] | boolean | undefined
|
|
19
|
+
|
|
20
|
+
export type Validate<TFieldValue> = (
|
|
21
|
+
value: TFieldValue
|
|
22
|
+
) => ValidateResult | Promise<ValidateResult>
|
|
23
|
+
|
|
24
|
+
export type RegisterOptions<
|
|
25
|
+
TFieldValues extends FieldValues = FieldValues,
|
|
26
|
+
TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
|
|
27
|
+
> = Partial<{
|
|
28
|
+
required: Message | ValidationRule<boolean>
|
|
29
|
+
min: ValidationRule<number | string>
|
|
30
|
+
max: ValidationRule<number | string>
|
|
31
|
+
maxLength: ValidationRule<number>
|
|
32
|
+
minLength: ValidationRule<number>
|
|
33
|
+
pattern: ValidationRule<RegExp>
|
|
34
|
+
validate:
|
|
35
|
+
| Validate<FieldPathValue<TFieldValues, TFieldName>>
|
|
36
|
+
| Record<string, Validate<FieldPathValue<TFieldValues, TFieldName>>>
|
|
37
|
+
valueAsNumber: boolean
|
|
38
|
+
valueAsDate: boolean
|
|
39
|
+
value: FieldPathValue<TFieldValues, TFieldName>
|
|
40
|
+
setValueAs: (value: any) => any
|
|
41
|
+
shouldUnregister?: boolean
|
|
42
|
+
onChange?: (event: any) => void
|
|
43
|
+
onBlur?: (event: any) => void
|
|
44
|
+
disabled: boolean
|
|
45
|
+
deps: InternalFieldName | InternalFieldName[]
|
|
46
|
+
}>
|