[Typescript] Construct Signatures

Construct signatures are similar to call signatures, except they describe what should happen with the new keyword.

interface DateConstructor {
  new (value: number): Date
}
 
let MyDateConstructor: DateConstructor = Date
const d = new MyDateConstructor()

 

posted @   Zhentiw  阅读(82)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
历史上的今天:
2021-07-28 [SAA + SAP] 11. Solution Architecture Comparisons
2020-07-28 [Express 5] Demo app
2017-07-28 [React Intl] Format Numbers with Separators and Currency Symbols using react-intl FormattedNumber
2017-07-28 [React Intl] Format a Date Relative to the Current Date Using react-intl FormattedRelative
2017-07-28 [React Intl] Format Date and Time Using react-intl FormattedDate and FormattedTime
2017-07-28 [React Intl] Render Content with Markup Using react-intl FormattedHTMLMessage
2017-07-28 [React Intl] Render Content with Placeholders using react-intl FormattedMessage
点击右上角即可分享
微信分享提示