08 2018 档案

TypeScript 之 tsconfig.json
摘要:https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/tsconfig.json.html 如果一个目录下存在一个tsconfig.json文件,那么它意味着这个目录是TypeScript项目的根目录。 tsconfig. 阅读全文

posted @ 2018-08-31 10:41 cag2050 阅读(449) 评论(0) 推荐(0) 编辑

TypeScript 之 声明文件的结构
摘要:https://www.tslang.cn/docs/handbook/declaration files/library structures.html 模块化库 一些库只能工作在模块加载器的环境下。 比如,像 express只能在Node.js里工作所以必须使用CommonJS的require函 阅读全文

posted @ 2018-08-30 18:14 cag2050 阅读(713) 评论(0) 推荐(0) 编辑

TypeScript 之 声明文件的使用
摘要:https://www.tslang.cn/docs/handbook/declaration files/consumption.html 下载 在TypeScript 2.0以上的版本,获取类型声明文件只需要使用npm。 比如,获取lodash库的声明文件,只需使用下面的命令: 如果一个npm包 阅读全文

posted @ 2018-08-30 16:15 cag2050 阅读(1009) 评论(0) 推荐(0) 编辑

TypeScript 之 声明文件的发布
摘要:https://www.tslang.cn/docs/handbook/declaration files/publishing.html 发布声明文件到npm,有两种方式: 1. 与你的npm包捆绑在一起(推荐) 2. 发布到npm上的@types organization。 包含声明文件到你的n 阅读全文

posted @ 2018-08-30 15:04 cag2050 阅读(477) 评论(0) 推荐(0) 编辑

TypeScript 之 NPM包的类型
摘要:https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Typings%20for%20NPM%20Packages.html 你的定义文件应该: 1. 是.d.ts文件 2. 写做外部模块 3. 不包含 引用 阅读全文

posted @ 2018-08-30 09:59 cag2050 阅读(808) 评论(0) 推荐(0) 编辑

create-react-app-typescript 知识点
摘要:github:https://github.com/wmonk/create react app typescript 报错: 原因:import名称排序问题,要求按照字母从小到大排序;修改rules的规则“ordered imports”为false即可。 解决:https://cdn2.jian 阅读全文

posted @ 2018-08-29 15:54 cag2050 阅读(936) 评论(0) 推荐(0) 编辑

TypeScript 之 泛型
摘要:https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Generics.html 泛型:可以支持多种类型的数据 泛型函数的定义 这里使用了类型变量,它是一种特殊的变量,只用于表示类型而不是值。 我们给identity添加了 阅读全文

posted @ 2018-08-29 14:17 cag2050 阅读(131) 评论(0) 推荐(0) 编辑

TypeScript 之 类型推导
摘要:https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Type%20Inference.html 类型推导:发生在初始化变量和成员,设置默认参数值和决定函数返回值时。 最佳通用类型 计算通用类型算法会考虑所有的候选类型,并 阅读全文

posted @ 2018-08-29 12:03 cag2050 阅读(1266) 评论(0) 推荐(0) 编辑

TypeScript 之 JSX
摘要:https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/JSX.html JSX中,类型断言必须使用as操作符。 类型检查 固有元素:环境自带的某些东西(比如,在DOM环境里的div或span)。 基于值的元素:你自定义的组 阅读全文

posted @ 2018-08-29 11:44 cag2050 阅读(1653) 评论(0) 推荐(0) 编辑

TypeScript 之 书写.d.ts文件
摘要:https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Writing%20Definition%20Files.html 类的分解 TypeScript的类会创建出两个类型: 1. 实例类型,定义了类的实例具有哪些成员; 阅读全文

posted @ 2018-08-29 11:01 cag2050 阅读(1631) 评论(0) 推荐(0) 编辑

TypeScript 之 函数
摘要:https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Functions.html 为函数定义类型 为函数添加类型: TypeScript能够根据返回语句自动推断出返回值类型,因此我们通常省略它。 TypeScript中, 阅读全文

posted @ 2018-08-28 19:06 cag2050 阅读(113) 评论(0) 推荐(0) 编辑

TypeScript 之 基础类型、高级类型
摘要:基础类型:https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Basic%20Types.html 高级类型:https://m.runoob.com/manual/gitbook/TypeScript/_book/do 阅读全文

posted @ 2018-08-28 11:55 cag2050 阅读(262) 评论(0) 推荐(0) 编辑

TypeScript 之 三斜线指令
摘要:https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Triple Slash%20Directives.html 一个三斜线引用路径是相对于包含它的文件的,如果不是根文件。 三斜线指令 : 用于声明文件间的依赖,告诉编译 阅读全文

posted @ 2018-08-28 11:18 cag2050 阅读(1213) 评论(0) 推荐(1) 编辑

TypeScript 与 es6 写法的区别
摘要:import 方式 ts 默认对于 commonjs 的模块是这样加载的: es6: 不想改变 es6 的写法,可以使用 ts 提供的一个编译参数 : 阅读全文

posted @ 2018-08-28 11:07 cag2050 阅读(840) 评论(0) 推荐(0) 编辑

TypeScript 之 模块
摘要:https://m.runoob.com/manual/gitbook/TypeScript/_book/doc/handbook/Modules.html 外部模块简写 外部模块简写: 的含义: 告诉编译器,以 结尾的模块存在、且导出的值的类型为 。 阅读全文

posted @ 2018-08-28 10:40 cag2050 阅读(194) 评论(0) 推荐(0) 编辑

gaea-basic-components 知识点
摘要:github 地址:https://github.com/ascoders/gaea basic components 阅读全文

posted @ 2018-08-26 12:03 cag2050 阅读(223) 评论(0) 推荐(0) 编辑

gaea-editor 知识点
摘要:github 地址:https://github.com/ascoders/gaea editor 阅读全文

posted @ 2018-08-26 12:02 cag2050 阅读(361) 评论(0) 推荐(0) 编辑

git submodule的使用(.gitmodules文件子模块加载)
摘要:https://blog.csdn.net/qq_27295403/article/details/80486116 阅读全文

posted @ 2018-08-23 16:41 cag2050 阅读(2740) 评论(0) 推荐(0) 编辑

React 中的 Component、PureComponent、无状态组件 之间的比较
摘要:React 中的 Component、PureComponent、无状态组件之间的比较 table th:first of type { width: 150px; } 组件类型 | 说明 | React.createClass | 不使用ES6语法,只能使用 React.createClass 来 阅读全文

posted @ 2018-08-17 14:33 cag2050 阅读(1210) 评论(1) 推荐(0) 编辑

在vue-cli 2.x 项目中,引入stylus的全局CSS变量
摘要:出处:https://blog.csdn.net/weixin_39378610/article/details/81140358 阅读全文

posted @ 2018-08-09 15:38 cag2050 阅读(1154) 评论(0) 推荐(0) 编辑

导航

点击右上角即可分享
微信分享提示