infer the type of the channel