[英]How to define a type alias using a variable name
I need to define a type alias, and I know that a variable is of the type I need an alias for.我需要定义一个类型别名,并且我知道变量是我需要一个别名的类型。 The explicit name for the type is not available.
该类型的显式名称不可用。 What can I do?
我能做什么?
You cannot have two distinct types with the same name.不能有两个具有相同名称的不同类型。
You can have types of the same name in different namespace
s though.但是,您可以在不同的
namespace
中拥有相同名称的类型。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.