随笔分类 -  TypeScript

摘要:https://segmentfault.com/a/1190000015264821 1. typeof 查看数据类型的类型 使用 typeof obj; 返回值:"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" 阅读全文
posted @ 2021-08-30 23:26 wl夏白 阅读(85) 评论(0) 推荐(0)
摘要:定义 使用关键字enum定义 enum demo{ a, b="c", $c=3, "_1" }; 详解 1.定义枚举的时候,没有赋值,默认从0开始 enum demo{ a, b, c }; console.log(demo.a);//return 0 console.log(demo[1]);/ 阅读全文
posted @ 2021-08-30 00:06 wl夏白 阅读(1202) 评论(0) 推荐(0)