随笔分类 -  typescript

从ts入门到应用
摘要:接口的学习 - 定义对象、数组、函数、类 定义对象🌰 interface Color{ color:string } 定义数组 🌰 interface Swiper{ [index:number]:string; } const s1:Swiper=['1','3']; 定义函数 🌰 inte 阅读全文
posted @ 2021-02-24 16:02 囚龙棒主 阅读(118) 评论(0) 推荐(0)
摘要:1.ts基本指令 tsc -v tsc --watch demo.ts 阅读全文
posted @ 2021-02-24 15:13 囚龙棒主 阅读(513) 评论(0) 推荐(0)
摘要:1.安装ts npm i -g typescript tsc -v tsc demo.ts 2.安装ts-node,直接运行ts文件 npm i -g ts-node 备注:安装后出现报错,再yarn add global ts-node 阅读全文
posted @ 2021-02-24 12:36 囚龙棒主 阅读(415) 评论(0) 推荐(0)