How to check if a 'any'-Object fits a union type?
I’m getting an object (type: any) of an external library A and want to pass it to a function from a library B. That function expects a Type B-Input, which is a Union Type (number | string | somethingCustom). How can I check if the object is compatible? (More precise: momentJS expects a MomentInput. An… Read More How to check if a 'any'-Object fits a union type?