# TypeScript **Repository Path**: Gnius/type-sc ## Basic Information - **Project Name**: TypeScript - **Description**: 2020年9月12日下午15:00 在家自学 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-12 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 学习 TypeScript 笔记 ## 第一种方法运行.ts 文件 安装:npm install typescript[@3.6.4] -g 使用:在 cmd 下输入 tsc demo.ts 回车后 生成相对应的 demo.js 然后在 node 环境下运行 node demo.js 会输出程序运行结果 ## 第二种方法运行.ts 文件 安装:npm install -g ts-node 使用:在 cmd 下输入 ts-node demo.ts 回车后 直接输出.ts 文件运行结果 (方便) # 学习 TypeScript 实际上是在学它的静态类型,和衍生语法。 ### 我们看到一个变量是一个静态类型,不仅仅意味着这个变量的类型不能修改,还意味着这个变量的属性和方法基本就确定了。 ### vscode 中会给相应的方法提示。