Return a helper function that returns true if the given Thing is any of the given types.
if (typecheck(ThingType.number, ThingType.string)(object)) { // inside this block, object is known to be // Thing<ThingType.number> | Thing<ThingType.string>} Copy
if (typecheck(ThingType.number, ThingType.string)(object)) { // inside this block, object is known to be // Thing<ThingType.number> | Thing<ThingType.string>}
Return a helper function that returns true if the given Thing is any of the given types.