首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >typescript-exercises(十三)

typescript-exercises(十三)

作者头像
阿超
发布2024-11-09 09:24:38
发布2024-11-09 09:24:38
1540
举报
文章被收录于专栏:快乐阿超快乐阿超

人不仅为自己而生,而且也为祖国活着。——柏拉图

题目:

代码语言:javascript
复制
// This enables module augmentation mode.
import 'date-wizard';

declare module 'date-wizard' {
    // Add your module extensions here.
}

报错:

代码语言:javascript
复制
index.ts(79,30): error TS2339: Property 'pad' does not exist on type 'typeof import("/node_modules/date-wizard/index.d.ts")'.
index.ts(101,67): error TS2339: Property 'hours' does not exist on type 'DateDetails'.
test.ts(5,5): error TS2344: Type 'false' does not satisfy the constraint 'true'.
test.ts(19,5): error TS2344: Type 'false' does not satisfy the constraint 'true'.
test.ts(20,27): error TS2339: Property 'pad' does not exist on type 'typeof import("/node_modules/date-wizard/index.d.ts")'.

答案:

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2024-11-08,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档