type a = string
请问interface可以像type一样定义一个字符串或者数组吗?
是的,interface只能以键值对的形式声明,哪怕只是一个
interface aInterface { a:string; }