UNPKG

use-wizard

Version:

A dead-easy-to-use light-weight react hook to handle multi-paths wizards (and simple wizards too) and navigate into them.

16 lines (10 loc) 407 B
import {TWizardOptions} from "../TWizardOptions"; import {isTypeLinearS} from "./isTypeLinearS"; import {isTypeNested} from "./isTypeNested"; import {isTypeLinearN} from "./isTypeLinearN"; export {isTypeWizard}; const isTypeWizard = (input: unknown): input is TWizardOptions => { if(isTypeLinearN(input)) return true; if(isTypeLinearS(input)) return true; return !!isTypeNested(input); }