Skip to content

Commit adae3da

Browse files
authored
fix json-schema SchemaReaction type error (#1367)
* fix(json-schema): fix SchemaReaction#dependencies type error * fix(json-schema): fix SchemaReaction#state not support compile expression
1 parent c896afc commit adae3da

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/json-schema/src/types.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,17 @@ export type SchemaEffectTypes =
5757

5858
export type SchemaReaction<Field = any> =
5959
| {
60-
dependencies?: string[]
60+
dependencies?: string[] | Record<string, string>
6161
when?: string | boolean
6262
target?: string
6363
effects?: SchemaEffectTypes[]
6464
fulfill?: {
65-
state?: Formily.Core.Types.IGeneralFieldState
65+
state?: Stringify<Formily.Core.Types.IGeneralFieldState>
6666
schema?: ISchema
6767
run?: string
6868
}
6969
otherwise?: {
70-
state?: Formily.Core.Types.IGeneralFieldState
70+
state?: Stringify<Formily.Core.Types.IGeneralFieldState>
7171
schema?: ISchema
7272
run?: string
7373
}
@@ -119,7 +119,7 @@ export interface ISchemaFieldFactoryOptions<
119119
}
120120

121121
export interface ISchemaFieldUpdateRequest {
122-
state?: Formily.Core.Types.IFieldState
122+
state?: Stringify<Formily.Core.Types.IFieldState>
123123
schema?: ISchema
124124
run?: string
125125
}

0 commit comments

Comments
 (0)