supporting type declarations with generics