【TypeScript】十一、never类型
let a: string & number

function error(message: string): never {
    throw new Error(message)
}
// error("my error")
function loop(): never {
    while(true) {

    }
}
posted on 2022-07-05 18:14  仓鼠不爱吃辣条  阅读(28)  评论(0)    收藏  举报

页尾

页尾

页尾

页尾

页尾

页尾

页尾