简单类型 / 字符串

//Empty strings
let someEmptyString: string = ""
let anotherEmptyString = ''

if (!someEmptyString) {
    console.log("string is empty")
}

if (anotherEmptyString.length == 0) {
    console.log("another string is empty")
}