TypeScript学习
文章平均质量分 73
Dilomen
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
初识TypeScript
通过npm全局安装typescript npm install -g typescript 这样就是在全局使用tsc来编译typescript文件生成JavaScript文件了 tsc helloworld.ts 类型定义: :后面加类型来定义类型 ? 表示是否需要,即可选 | 表示多选,即可以在提供的类型中选择任意一种类型 any 表示任意类型 <> 或 as 当一个值可能出现多...原创 2018-11-08 23:23:58 · 205 阅读 · 0 评论 -
将ts编写的代码上传到npm
tip:已有ts环境,即安装了typescript依赖,这边不涉及到webpack和各种框架,就只是一个ts的小demo 编写tsconfig.js { "compilerOptions": { "target": "es5", "module": "commonjs", "lib": [], "declaration": true,...原创 2019-09-08 10:06:27 · 643 阅读 · 0 评论
分享