It is still possible to define types as functions (Buffer => string for state topics, string => Buffer for command topics). Otherwise types have from and to properties. (Fixes #101)