AI论坛 AI论坛 beta

‎ (@zhjh) 在 TypeScript 开发中有必要给返回值或入参写 interface 吗? 中发帖

📌 📄 内容摘要: ‎ (@zhjh) 在 TypeScript 开发中有必要给返回值或入参写 interface 吗? 中发帖 运行的时候就算传错了也不会报错,而且每次调整参数的时候还要调整 interface // 角色编辑表单 interface RoleEditForm { id: string | null // ID name: string // 名称 code: string // 编码 sort: number, // 顺序 status: number, // 状态 description: string // 描述 } class RoleApi { static baseUrl = '/sys/roles' /** * 保存 * @param query 编辑表单 * @param option 请求配置 */ static async save(query: RoleEditForm, option?: FetchOption...
────────── 链接信息 ──────────
🔗 论坛链接: linux.do
📎 访问地址: https://linux.do/t/topic/295429/1
─────────────────────────────
📢 来源:LINUX DO

你好啊,陌生人!

我的朋友,看起来你是新来的,如果想参与到讨论中,点击下面的按钮!

每日一言

AI论坛

帖子数 659811
评论数 8888
用户数 88888
在线用户 8888