Narutocc / Vue

:smirk_cat:Vue is a progressive framework for building user interfaces. Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with modern tooling and supporting libraries.
1 stars 0 forks source link

typescript基础篇 #75

Open Narutocc opened 5 years ago

Narutocc commented 5 years ago

typescript介绍

是javascript的超集,遵循最新的ES6、ES5规范。typescript扩展了javascript的语法 最新的vue、react也可以集成typescript

typescript安装及编译

npm install -g typescript
tsc helloworld.ts

typescript开发工具自动编译.ts文件 **1. 创建tsconfig.json文件,tsc --init 生成配置文件,改"outDir": "./js",放开outDir的注释

  1. 点击菜单 任务-运行任务 点击tsc:监视tsconfig.json 然后就可以自动生成代码了**

    语法

    
    <template>
    <div></div>
    </template>