Declaring keys (“key1” | “key2”) first and then enforcing that another object type must have those keys

后端 未结 0 1023
野性不改
野性不改 2021-02-01 13:00

Usually in typescript you\'d use the pattern that you declare a type:

type O = {"key1": string, "key2": int}

and then you can decl

相关标签:
回答
  • 消灭零回复
提交回复
热议问题