2017年11月2日

typescript学习-变量声明

摘要: /** * 块作用域 */ function f(input: boolean) { let a = 100; if (input) { let b = a + 1; return b; } // return b; [ts] Cannot find name 'b' } /** * 重定义以及屏蔽 */ let x =... 阅读全文

posted @ 2017-11-02 23:42 yellowStar1992 阅读(90) 评论(0) 推荐(0)

typescript学习-基础类型

摘要: /** * 布尔值 */ let isDone: boolean = false; /** * 数字 */ let decLiteral: number = 6; let hexLiteral: number = 0xf00d; /** * 字符串 */ let userName: string = `smith`; /** * 数组 */ let list: number[] ... 阅读全文

posted @ 2017-11-02 21:33 yellowStar1992 阅读(129) 评论(0) 推荐(0)

导航