Skip to content

Commit

Permalink
refactor(typings): update FormStep、dispatch、notify typings
Browse files Browse the repository at this point in the history
  • Loading branch information
atzcl committed Dec 7, 2019
1 parent ce5f315 commit 929ef2c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/antd/src/components/FormStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const EffectHooks = {
}>(StateMap.ON_FORM_STEP_CURRENT_CHANGE)
}

type StepComponentExtendsProps = StateMap
type StepComponentExtendsProps = typeof StateMap

export const FormStep: React.FC<IFormStep> &
StepComponentExtendsProps = createControllerBox<IFormStep>(
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/components/FormStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const EffectHooks = {
}>(StateMap.ON_FORM_STEP_CURRENT_CHANGE)
}

type StepComponentExtendsProps = StateMap
type StepComponentExtendsProps = typeof StateMap

export const FormStep: React.FC<IFormStep> &
StepComponentExtendsProps = createControllerBox<IFormStep>(
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ export interface IFormActions {
setFormGraph(graph: IFormGraph): void
subscribe(callback?: FormHeartSubscriber): number
unsubscribe(id: number): void
notify: <T>(type: string, payload: T) => void
dispatch: <T>(type: string, payload: T) => void
notify: <T>(type: string, payload?: T) => void
dispatch: <T>(type: string, payload?: T) => void
setFieldValue(path?: FormPathPattern, value?: any): void
getFieldValue(path?: FormPathPattern): any
setFieldInitialValue(path?: FormPathPattern, value?: any): void
Expand Down

0 comments on commit 929ef2c

Please sign in to comment.