📜  typescript 通用记录 - TypeScript 代码示例

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

代码示例1
// You should check the source of why you have to force string and number
// Example 1 with Generic with default value

type DefaultSlotType = "something" | "something2"

type PlayerInventory = Record

// Example 2 without default

type PlayerInventory = Record

// Example 2 without default and just a string
type PlayerInventory = Record