Answer the question
In order to leave comments, you need to log in
How to shorten the entry in "or"?
export const isBs = (lead: IData): boolean =>
lead.processingWay === ProcessingWay.Remote &&
(lead.identityCheck === IdentityCheck.ESIA || lead.identityCheck === IdentityCheck.SMEV); // тут как-то можно сократить?чтобы не писать два раза lead.identityCheck ===
Answer the question
In order to leave comments, you need to log in
maybe something like this
[IdentityCheck.SMEV,IdentityCheck.ESIA].includes(lead.identityCheck )
Here it is!
[IdentityCheck.SMEV,IdentityCheck.ESIA].some((a)=>lead.identityCheck===a)
All options can be viewed here .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question