I have this logic,
.switchMap((data: ISearchModalPayload | number ) => {..... }
where data
is either an interface object or a number.
How can I determine the data type before I carry on with my routine?
I tried the following, from this post, but none worked:
if (obj instanceof C) {}
Object.getClass()
.isInstance