TypeScript基础Angular: Zero to HeroLearning Typescript

【第1篇】TypeScript在Eclipse安装详细教程

2019-06-04  本文已影响1人  爱学习的蹭蹭

1、前言

2、背景

3 特性

语法上,TypeScript 很类似于 JScript .NET,另外一个添加了对静态类型,经典的面向对象语言特性如类,继承,接口和命名空间等的支持的 Microsoft 对 ECMA-262 语言标准的实现。

4 工具

5 开源

6 、安装准备设置网络代理

7、Nodejs下载与安装

http://nodejs.org/download/

8 、Eclipse下的typescript插件

http://eclipse-update.palantir.com/eclipse-typescript/
注意:
1)不要勾选Enable typeScript Builder,勾选了这个它不会帮你生成js文件
2)勾选Disable typeScript Builder即可

typescript插件

9、typescript官方

http://www.typescriptlang.org/(官方网址)
http://www.typescriptlang.org/Tutorial/(官方例子)

10、推荐学习博客

http://blog.oio.de/2013/08/05/typescript-plug-in-for-eclipse/安装博客
http://freewind.me/blog/20130128/2034.html学习博客

11、TypeScript

 class  Greeter{
    
    element:HTMLElement;
    span:HTMLElement;
    timerToken:number;
     
    constructor(element:HTMLElement){
        this.element=element;
        this.element.innerText+="this time is: ";
        this.span=document.createElement("span");
        this.element.appendChild(this.span);
        this.span.innerText=new Date().toUTCString();
         
    }
    
    //start
    start(){
        this.timerToken=setInterval(()=>
            this.span.innerText=new Date().toUTCString(),500
        );
    }
    //stop
    stop(){
        clearTimeout(this.timerToken);
    }
}
 
window.onload= ()=>{
 
       var el=document.getElementById("content");
        
       var greeter=new Greeter(el);//create greeter object
    
       greeter.start();    
}

12、TypeScript语言官方

typescriptlang官方

typescriptlang官方手册

总结与感想

作者:jilongliang
原文:https://blog.csdn.net/jilongliang/article/details/21942911
版权声明:本文为博主原创文章,转载请附上博文链接!
1、博客所有文章是本人2014年撰写,而GItHub的源代码是有些是2014年与2015年进行整理,由于在2013年项目接触TypeScript,同时在当年接触KendoUI开发的时候TypeScript的影子,故一年后决定把官方文档所有API文档认真琢磨了一遍,并且撰写成一本最全的中文TypeScript入门指南详解案例教程与代码,当初的下载量还是比较高的。由于最近接触Kotlin,自从学习TypeScript,它的语法对我后面学习Kotlin有了极大的帮助,个人感觉,它的语法跟ActionScript,Swift写法很像。故虽然好几年没怎么开发前端,由于它的重要性特意重新花点进行整理这门前端语言。
2、学习TypeScript的源码例子

上一篇 下一篇

猜你喜欢

热点阅读