wednesdayco 最近的时间轴更新
wednesdayco

wednesdayco

V2EX 第 191754 号会员,加入于 2016-09-14 15:27:02 +08:00
wednesdayco 最近回复了
34 天前
回复了 mulinchenkai 创建的主题 ? 职场话题 ? 寻求初级前端工作
@mulinchenkai 还得是北上深机会多些
34 天前
回复了 mulinchenkai 创建的主题 ? 职场话题 ? 寻求初级前端工作
成都现在找前端很难吧
@xgfan 果然是国产的盘不耐用么。只用了半年就出现了这种问题
@NoManPlay 想法很好,但是实际初始化 StrictCustomType 的对象的时候,会报错。
@nomagick 这样做在类型提示上确实是对的,问题在初始化的时候不能加除了 id 以外的属性
node 写胶水层还是不错的,但是这是亮点,不是主要的方向吧
@MRG0

const data: IData = {
id: 'xxx-xxx-xxx', // id 只能是 string
cid: 123123123,
name: 233233,
...//任意属性,但值必须是 number 不能是其他的或者 string
}
@tearzx 不能限制 id 的类型,这样 id 可以为 number
@simoger 除属性 id 的值的类型是 string 之外,其他的值的类型都必须是 number
@liahu 其他的属性值的类型必须是 number ,除了属性 id 的值的类型必须是 string
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   994 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 21ms · UTC 23:48 · PVG 07:48 · LAX 16:48 · JFK 19:48
Developed with CodeLauncher
? Do have faith in what you're doing.


http://www.vxiaotou.com