摘要: type BanType<T, E> = T extends E ? never : T; type BanDate<T> = BanType<T, Date>; function log<T>(x: BanDate<T>) { console.log() } log(new Date()) // 阅读全文
posted @ 2024-09-09 14:55 Zhentiw 阅读(12) 评论(0) 推荐(0)
摘要: .callmethod exits on any function, which will refer to Function.prototype.call for example: console.log.call Function.prototype.call // call Also it m 阅读全文
posted @ 2024-09-09 14:52 Zhentiw 阅读(14) 评论(0) 推荐(0)
摘要: const requestFullscreenProps = [ "requestFullScreen", "webkitRequestFullScreen", "mozRequestFullScreen", "msRequestFullScreen", ] as const; const exit 阅读全文
posted @ 2024-09-09 14:39 Zhentiw 阅读(20) 评论(0) 推荐(0)
摘要: The difference between document.body and document.documentElement: document.body returns the <body> elementdocument.documentElement returns the <html> 阅读全文
posted @ 2024-09-09 14:09 Zhentiw 阅读(11) 评论(0) 推荐(0)