📜  命名类型只是为类型命名 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:21.533000             🧑  作者: Mango

代码示例1
type One = { p: string };
interface Two {
  p: string;
}
class Three {
  p = "Hello";
}
 
let x: One = { p: "hi" };
let two: Two = x;
two = new Three();