move deprecation check to codegen
check typedef deprecation during type_module_type