What is wrong:
StepWizard has the wrong type definition for the instance callback.
What I would expect:
interface StepWizardTransitionProps {
enterRight?: string;
enterLeft?: string;
exitRight?: string;
exitLeft?: string;
intro?: string;
}
interface StepWizardInstanceProps {
getHash: () => string;
getTransitions: () => StepWizardTransitionProps;
onHashChange: () => void;
isInvalidStep: (next: number) => boolean;
setActiveStep: (next: number) => void;
// do we need onStepChange ??
currentStep: number;
totalSteps: number;
getSteps: () => ReactElement[];
firstStep: () => void;
lastStep: () => void;
nextStep: () => void;
previousStep: () => void;
goToStep: (step: number) => void;
goToNamedStep: (stepName: string) => void;
updateHash: (activeHash: string) => void;
}
instance: (wizard: StepWizardInstanceProps) => void
What is wrong:
StepWizard has the wrong type definition for the instance callback.
What I would expect:
instance: (wizard: StepWizardInstanceProps) => void