Dependence the type of one prop on the type of other prop
Advertisements Is it possible to somehow combine the description of the two types of the React component props below. On isEdit == true: type DialogProps = { isEdit: boolean obj: ICustom } and on isEdit == false: type DialogProps = { isEdit: boolean obj: null } >Solution : Try using discriminated union: type EditDialogProps =… Read More Dependence the type of one prop on the type of other prop