上一页 1 2 3 4 5 6 7 ··· 58 下一页
摘要: 所有 typeof 返回值为 'object' 的对象(如数组)都包含一个内部属性,这个属性无法直接访问,一般通过 Object.prototype.toString(...) 来查看​ 数组,正则表达式,对象的内部属性[[Class]]和创建该对象的内建原生构造函数相对应 Null(),Undef 阅读全文
posted @ 2020-10-13 08:29 wzndkj 阅读(274) 评论(0) 推荐(0) 编辑
摘要: JS 的内建函数,也叫原生函数,如 String 和 Number 常用的原生函数有: String() Number() Boolean() Array() Object() Function() RegExp() Date() Error() Symbol() var s = new Strin 阅读全文
posted @ 2020-10-12 08:17 wzndkj 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1.首先安装n模块: sudo npm install -g n 2.升级node.js到最新稳定版 sudo n stable 3.升级到最新版 sudo n latest 4.n后面也可以跟随版本号,升级到任意版本 sudo n v0.10.26或sudo n 0.10.26 5.切换使用版本 阅读全文
posted @ 2020-08-28 14:05 wzndkj 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 1、安装brew命令 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2、安装nginx brew install nginx 3、启动nginx sudo nginx 阅读全文
posted @ 2020-08-26 16:56 wzndkj 阅读(124) 评论(0) 推荐(0) 编辑
摘要: npm install -g cnpm --registry=https://registry.npm.taobao.orgcnpm -v 阅读全文
posted @ 2020-08-26 15:33 wzndkj 阅读(199) 评论(0) 推荐(0) 编辑
摘要: import 'reflect-metadata'; function showData(target: typeof User) { for (let key in target.prototype) { const data = Reflect.getMetadata('data', targe 阅读全文
posted @ 2020-08-17 08:26 wzndkj 阅读(369) 评论(0) 推荐(0) 编辑
摘要: reflect-metadata 是一个库,这个库可以帮助我们在类上面或者类的属性上面去存储一些数据,并且方便的数据获取 安装这个库 npm install reflect-metadata --save import 'reflect-metadata'; const user = { name: 阅读全文
posted @ 2020-08-13 08:25 wzndkj 阅读(1212) 评论(0) 推荐(0) 编辑
摘要: const userInfo: any = undefined; class Test{ getName() { return userInfo.name; } getAge() { return userInfo.age; } } const test = new Test(); test.get 阅读全文
posted @ 2020-08-12 09:01 wzndkj 阅读(461) 评论(0) 推荐(0) 编辑
摘要: /** * 参数装饰器,只要是装饰器一定是函数 * @param target Test 对应的 prototype * @param key 方法名 * @param paramIndex 参数所在的位置 */ function paramDecorator(target: any, method 阅读全文
posted @ 2020-08-11 08:13 wzndkj 阅读(983) 评论(0) 推荐(0) 编辑
摘要: /** * 属性装饰器只能接收到两个参数 * @param target Test 对应的 prototype * @param key 属性名字 */ function nameDecorator(target: any, key: string):any { const descriptor: 阅读全文
posted @ 2020-08-10 08:21 wzndkj 阅读(1030) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 58 下一页