SlideShare a Scribd company logo
TypeScript
  Reagan Hwang
  Microsoft Korea
Application scale JavaScript
   development is hard.
TypeScript is a language for application
    scale JavaScript development.
TypeScript is a typed superset of JavaScript
    that compiles to plain JavaScript.
TypeScript is a typed superset of JavaScript
     that compiles to plain JavaScript.

Any browser. Any host. Any OS. Open Source.
TypeScript
• Starts with JavaScript
   • All JavaScript code is TypeScript code, simply copy and paste
   • All JavaScript libraries work with TypeScript


• Optional static types, classes, modules
   • Enable scalable application development and excellent tooling
   • Zero cost: Static types completely disappear at run-time


• Ends with JavaScript
   • Compiles to idiomatic JavaScript
   • Runs in any browser or host, on any OS
TypeScript Type System
Type System
• Formalization of JavaScript’s types
   • Static representation of JavaScript’s dynamic type system


• Type inference and structural typing
   • In practice very few type annotations are necessary


• Works with existing JavaScript libraries
   • Declaration files can be written and maintained separately


• Not “provably type safe”
   • Types reflect intent but do not provide guarantees
Type Annotation
Object types : interface
TypeScript classes and modules
Classes and modules
• Scalable application structuring
   • Classes, Modules, and Interfaces enable clear contracts between components


• Aligned with emerging standards
   • Class, Module, and Arrow Function syntax aligns with ECMAScript 6 proposals


• Supports popular module systems
   • CommonJS and AMD modules in any ECMAScript 3 compatible environment
Class
Class Features
class Point {                                                  class Point3D extends Point {
    x: number;                                                     constructor (x: number, y: number, public z: number) {
    private color: string;                                             super(x, y);
    constructor (x: number, public y: number = 0) {                }
        this.x = x;                                                dist() {
        this.color = "red";                                            var d = super.dist();
    }                                                                  return Math.sqrt(d * d + this.z * this.z);
    dist() {                                                       }
        return Math.sqrt(this.x * this.x + this.y * this.y);   }
    }
    get distance() {                                           var p = new Point(10);
        return Math.sqrt(this.x * this.x + this.y * this.y);   p.x = 10;
    }                                                          p.y = 20;
    static origin = new Point(0, 0);
}
Module
Application Scale TypeScript
TypeScript preview
• Compiler
   • Open Source, written in TypeScript

• Tooling
   • Visual Studio language service, browser hosted playground

• Libraries
   • Static typing of DOM, jQuery, node.js, WinRT, WinJS, …

• And More
   • Lots of samples and formal Language Specification
Editors
• TypeScript is available in Sublime Text, Vi, Emacs editor
  • http://blogs.msdn.com/b/interoperability/archive/2012/10/01/sublime-
    text-vi-emacs-typescript-enabled.aspx
Nodejs
Visual Studio
• TypeScript for Visual Studio 2012
  • http://www.microsoft.com/en-us/download/details.aspx?id=34790
• Web Essentials 2012
     • http://visualstudiogallery.msdn.microsoft.com/07d54d12-7133-4e15-becb-
       6f451ea3bea6
Sublime Text
Interface 응용
interface Accumulator {
    clear(): void;
    add(x: number): void;
    result(): number;
}

function makeAccumulator():Accumulator {
    var sum = 0;
    return {
        clear: function () { sum = 0; },
        addx: function (value: number) { sum += value; },
        result: function () { return sum; }
    }
}
var a = makeAccumulator();
a.add(5);
Definition 파일(lib.d.ts)
document.onmousemove = function (e) {

}

onmousemove: (ev: MouseEvent) => any;
Arrow Function Expressions
• TypeScript supports arrow function expressions, a new feature planned for ECMAScript
  6. Arrow function expressions are a compact form of function expressions that omit the
  function keyword and have lexical scoping of this.

class Tracker {
    count = 0;
    start() {
        window.onmousemove = e => {
            this.count++;
            console.log(this.count);
        }
    }
}
var t = new Tracker();
t.start();
TypeScript Roadmap
• 0.8.2
    • Improve the build system
    • Improve compiler performance
• 0.8.3
    • Generics
    • Improvements to type system to help model a larger variety of JS libraries
• 0.9.x
    • Align with ECMAScript 6
    • Community site for .d.ts files
    • Usability improvements to VS plugin
• 1.x
    • A handful of language features are scheduled for exploration after the 1.0 release, including:
          • Async/Await
          • Mixins
          • Protected access
    • ES6-compatible codegen
Ambient Declarations
• document
  declare var document;
  document.title = "Hello";   // Ok because document has been
  declared


• jQuery
  declare var $;
Function Types
function vote(candidate: string, callback: (result: string) => any) {
   // ...
}

vote("BigPig",
     function(result: string) {
         if (result === "BigPig") {
            // ...
         }
     }
);
Object Types
var MakePoint: () => {
    x: number; y: number;
};
Resources
• TypeScript Website
    • http://www.typescriptlang.org/#Download
• Introducing TypeScript
    • http://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript
• Introducing TypeScript: A language for application-scale JavaScript development / build conference
  2012
    • http://channel9.msdn.com/Events/Build/2012/3-012
• Inside TypeScript
    • http://channel9.msdn.com/posts/Anders-Hejlsberg-Steve-Lucco-and-Luke-Hoban-Inside-TypeScript
• Introducing TypeScript / JSConf EU 2012
    • http://www.youtube.com/watch?v=3UTIcQYQ8Rw
• ECMAScript 6
    • http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/ECMAScript-6
• Getting started: TypeScript for Windows 8 Projects using Visual Studio 2012
    • http://blogs.msdn.com/b/yizhe/archive/2012/11/22/getting-started-typescript-for-windows-8-projects-using-visual-
      studio-2012.aspx
    • http://blog.tattoocoder.com/2012/10/typescript-for-windows-8-store-apps.html
Ad

More Related Content

What's hot (20)

Spring Up Your Graph
Spring Up Your GraphSpring Up Your Graph
Spring Up Your Graph
VMware Tanzu
 
Communication in Node.js
Communication in Node.jsCommunication in Node.js
Communication in Node.js
Edureka!
 
Writing RESTful web services using Node.js
Writing RESTful web services using Node.jsWriting RESTful web services using Node.js
Writing RESTful web services using Node.js
FDConf
 
Webinar: Securing your data - Mitigating the risks with MongoDB
Webinar: Securing your data - Mitigating the risks with MongoDBWebinar: Securing your data - Mitigating the risks with MongoDB
Webinar: Securing your data - Mitigating the risks with MongoDB
MongoDB
 
Architecting Secure and Compliant Applications with MongoDB
Architecting Secure and Compliant Applications with MongoDB        Architecting Secure and Compliant Applications with MongoDB
Architecting Secure and Compliant Applications with MongoDB
MongoDB
 
Capture, record, clip, embed and play, search: video from newbie to ninja
Capture, record, clip, embed and play, search: video from newbie to ninjaCapture, record, clip, embed and play, search: video from newbie to ninja
Capture, record, clip, embed and play, search: video from newbie to ninja
Vito Flavio Lorusso
 
Building scalable applications with angular js
Building scalable applications with angular jsBuilding scalable applications with angular js
Building scalable applications with angular js
Andrew Alpert
 
Звиад Кардава "Android Things + Google Weave"
Звиад Кардава "Android Things + Google Weave" Звиад Кардава "Android Things + Google Weave"
Звиад Кардава "Android Things + Google Weave"
IT Event
 
Groovy on Grails by Ziya Askerov
Groovy on Grails by Ziya AskerovGroovy on Grails by Ziya Askerov
Groovy on Grails by Ziya Askerov
Vuqar Suleymanov
 
Node js for enterprise
Node js for enterpriseNode js for enterprise
Node js for enterprise
ravisankar munusamy
 
Building Fast, Modern Web Applications with Node.js and CoffeeScript
Building Fast, Modern Web Applications with Node.js and CoffeeScriptBuilding Fast, Modern Web Applications with Node.js and CoffeeScript
Building Fast, Modern Web Applications with Node.js and CoffeeScript
royaldark
 
[143]Inside fuse deview 2016
[143]Inside fuse   deview 2016[143]Inside fuse   deview 2016
[143]Inside fuse deview 2016
NAVER D2
 
10 Excellent Ways to Secure Your Spring Boot Application - The Secure Develop...
10 Excellent Ways to Secure Your Spring Boot Application - The Secure Develop...10 Excellent Ways to Secure Your Spring Boot Application - The Secure Develop...
10 Excellent Ways to Secure Your Spring Boot Application - The Secure Develop...
Matt Raible
 
jOOQ at Topconf 2013
jOOQ at Topconf 2013jOOQ at Topconf 2013
jOOQ at Topconf 2013
Lukas Eder
 
Meetup Performance
Meetup PerformanceMeetup Performance
Meetup Performance
Greg Whalin
 
jclouds overview
jclouds overviewjclouds overview
jclouds overview
Adrian Cole
 
Get Back in Control of Your SQL with jOOQ at #Java2Days
Get Back in Control of Your SQL with jOOQ at #Java2DaysGet Back in Control of Your SQL with jOOQ at #Java2Days
Get Back in Control of Your SQL with jOOQ at #Java2Days
Lukas Eder
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup Performance
Justin Cataldo
 
JavaFest. Nanne Baars. Web application security for developers
JavaFest. Nanne Baars. Web application security for developersJavaFest. Nanne Baars. Web application security for developers
JavaFest. Nanne Baars. Web application security for developers
FestGroup
 
Micronaut For Single Page Apps
Micronaut For Single Page AppsMicronaut For Single Page Apps
Micronaut For Single Page Apps
Zachary Klein
 
Spring Up Your Graph
Spring Up Your GraphSpring Up Your Graph
Spring Up Your Graph
VMware Tanzu
 
Communication in Node.js
Communication in Node.jsCommunication in Node.js
Communication in Node.js
Edureka!
 
Writing RESTful web services using Node.js
Writing RESTful web services using Node.jsWriting RESTful web services using Node.js
Writing RESTful web services using Node.js
FDConf
 
Webinar: Securing your data - Mitigating the risks with MongoDB
Webinar: Securing your data - Mitigating the risks with MongoDBWebinar: Securing your data - Mitigating the risks with MongoDB
Webinar: Securing your data - Mitigating the risks with MongoDB
MongoDB
 
Architecting Secure and Compliant Applications with MongoDB
Architecting Secure and Compliant Applications with MongoDB        Architecting Secure and Compliant Applications with MongoDB
Architecting Secure and Compliant Applications with MongoDB
MongoDB
 
Capture, record, clip, embed and play, search: video from newbie to ninja
Capture, record, clip, embed and play, search: video from newbie to ninjaCapture, record, clip, embed and play, search: video from newbie to ninja
Capture, record, clip, embed and play, search: video from newbie to ninja
Vito Flavio Lorusso
 
Building scalable applications with angular js
Building scalable applications with angular jsBuilding scalable applications with angular js
Building scalable applications with angular js
Andrew Alpert
 
Звиад Кардава "Android Things + Google Weave"
Звиад Кардава "Android Things + Google Weave" Звиад Кардава "Android Things + Google Weave"
Звиад Кардава "Android Things + Google Weave"
IT Event
 
Groovy on Grails by Ziya Askerov
Groovy on Grails by Ziya AskerovGroovy on Grails by Ziya Askerov
Groovy on Grails by Ziya Askerov
Vuqar Suleymanov
 
Building Fast, Modern Web Applications with Node.js and CoffeeScript
Building Fast, Modern Web Applications with Node.js and CoffeeScriptBuilding Fast, Modern Web Applications with Node.js and CoffeeScript
Building Fast, Modern Web Applications with Node.js and CoffeeScript
royaldark
 
[143]Inside fuse deview 2016
[143]Inside fuse   deview 2016[143]Inside fuse   deview 2016
[143]Inside fuse deview 2016
NAVER D2
 
10 Excellent Ways to Secure Your Spring Boot Application - The Secure Develop...
10 Excellent Ways to Secure Your Spring Boot Application - The Secure Develop...10 Excellent Ways to Secure Your Spring Boot Application - The Secure Develop...
10 Excellent Ways to Secure Your Spring Boot Application - The Secure Develop...
Matt Raible
 
jOOQ at Topconf 2013
jOOQ at Topconf 2013jOOQ at Topconf 2013
jOOQ at Topconf 2013
Lukas Eder
 
Meetup Performance
Meetup PerformanceMeetup Performance
Meetup Performance
Greg Whalin
 
jclouds overview
jclouds overviewjclouds overview
jclouds overview
Adrian Cole
 
Get Back in Control of Your SQL with jOOQ at #Java2Days
Get Back in Control of Your SQL with jOOQ at #Java2DaysGet Back in Control of Your SQL with jOOQ at #Java2Days
Get Back in Control of Your SQL with jOOQ at #Java2Days
Lukas Eder
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup Performance
Justin Cataldo
 
JavaFest. Nanne Baars. Web application security for developers
JavaFest. Nanne Baars. Web application security for developersJavaFest. Nanne Baars. Web application security for developers
JavaFest. Nanne Baars. Web application security for developers
FestGroup
 
Micronaut For Single Page Apps
Micronaut For Single Page AppsMicronaut For Single Page Apps
Micronaut For Single Page Apps
Zachary Klein
 

Similar to JSLounge - TypeScript 소개 (20)

Visual studio 2008
Visual studio 2008Visual studio 2008
Visual studio 2008
Luis Enrique
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint Framework
Bob German
 
Next .NET and C#
Next .NET and C#Next .NET and C#
Next .NET and C#
Bertrand Le Roy
 
Roslyn: el futuro de C#
Roslyn: el futuro de C#Roslyn: el futuro de C#
Roslyn: el futuro de C#
Rodolfo Finochietti
 
Roslyn: el futuro de C# y VB.NET by Rodolfo Finochietti
Roslyn: el futuro de C# y VB.NET by Rodolfo FinochiettiRoslyn: el futuro de C# y VB.NET by Rodolfo Finochietti
Roslyn: el futuro de C# y VB.NET by Rodolfo Finochietti
.NET Conf UY
 
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
Sang Don Kim
 
U-SQL Killer Scenarios: Taming the Data Science Monster with U-SQL and Big Co...
U-SQL Killer Scenarios: Taming the Data Science Monster with U-SQL and Big Co...U-SQL Killer Scenarios: Taming the Data Science Monster with U-SQL and Big Co...
U-SQL Killer Scenarios: Taming the Data Science Monster with U-SQL and Big Co...
Michael Rys
 
End-to-End SPA Development using TypeScript
End-to-End SPA Development using TypeScriptEnd-to-End SPA Development using TypeScript
End-to-End SPA Development using TypeScript
Gil Fink
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java Developers
Yakov Fain
 
Building End-to-End Apps Using Typescript
Building End-to-End Apps Using TypescriptBuilding End-to-End Apps Using Typescript
Building End-to-End Apps Using Typescript
Gil Fink
 
TypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation GuideTypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation Guide
Nascenia IT
 
Typescript in 30mins
Typescript in 30mins Typescript in 30mins
Typescript in 30mins
Udaya Kumar
 
TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!
Alessandro Giorgetti
 
A la découverte de TypeScript
A la découverte de TypeScriptA la découverte de TypeScript
A la découverte de TypeScript
Denis Voituron
 
Introduction to C3.net Architecture unit
Introduction to C3.net Architecture unitIntroduction to C3.net Architecture unit
Introduction to C3.net Architecture unit
Kotresh Munavallimatt
 
Connecting C++ and JavaScript on the Web with Embind
Connecting C++ and JavaScript on the Web with EmbindConnecting C++ and JavaScript on the Web with Embind
Connecting C++ and JavaScript on the Web with Embind
Chad Austin
 
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Data Con LA
 
Oops lecture 1
Oops lecture 1Oops lecture 1
Oops lecture 1
rehan16091997
 
Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...
Andreas Dewes
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
Jeremy Likness
 
Visual studio 2008
Visual studio 2008Visual studio 2008
Visual studio 2008
Luis Enrique
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint Framework
Bob German
 
Roslyn: el futuro de C# y VB.NET by Rodolfo Finochietti
Roslyn: el futuro de C# y VB.NET by Rodolfo FinochiettiRoslyn: el futuro de C# y VB.NET by Rodolfo Finochietti
Roslyn: el futuro de C# y VB.NET by Rodolfo Finochietti
.NET Conf UY
 
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
[Td 2015] what is new in visual c++ 2015 and future directions(ulzii luvsanba...
Sang Don Kim
 
U-SQL Killer Scenarios: Taming the Data Science Monster with U-SQL and Big Co...
U-SQL Killer Scenarios: Taming the Data Science Monster with U-SQL and Big Co...U-SQL Killer Scenarios: Taming the Data Science Monster with U-SQL and Big Co...
U-SQL Killer Scenarios: Taming the Data Science Monster with U-SQL and Big Co...
Michael Rys
 
End-to-End SPA Development using TypeScript
End-to-End SPA Development using TypeScriptEnd-to-End SPA Development using TypeScript
End-to-End SPA Development using TypeScript
Gil Fink
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java Developers
Yakov Fain
 
Building End-to-End Apps Using Typescript
Building End-to-End Apps Using TypescriptBuilding End-to-End Apps Using Typescript
Building End-to-End Apps Using Typescript
Gil Fink
 
TypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation GuideTypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation Guide
Nascenia IT
 
Typescript in 30mins
Typescript in 30mins Typescript in 30mins
Typescript in 30mins
Udaya Kumar
 
TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!
Alessandro Giorgetti
 
A la découverte de TypeScript
A la découverte de TypeScriptA la découverte de TypeScript
A la découverte de TypeScript
Denis Voituron
 
Introduction to C3.net Architecture unit
Introduction to C3.net Architecture unitIntroduction to C3.net Architecture unit
Introduction to C3.net Architecture unit
Kotresh Munavallimatt
 
Connecting C++ and JavaScript on the Web with Embind
Connecting C++ and JavaScript on the Web with EmbindConnecting C++ and JavaScript on the Web with Embind
Connecting C++ and JavaScript on the Web with Embind
Chad Austin
 
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Big Data Day LA 2015 - Compiling DSLs for Diverse Execution Environments by Z...
Data Con LA
 
Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...
Andreas Dewes
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
Jeremy Likness
 
Ad

More from Reagan Hwang (16)

윈도우 스토어의 가능성
윈도우 스토어의 가능성윈도우 스토어의 가능성
윈도우 스토어의 가능성
Reagan Hwang
 
IE10 PP4 update for W3C HTML5 KIG
IE10 PP4 update for W3C HTML5 KIGIE10 PP4 update for W3C HTML5 KIG
IE10 PP4 update for W3C HTML5 KIG
Reagan Hwang
 
3 Screen UX - uxcampseoul 2011
3 Screen UX - uxcampseoul 20113 Screen UX - uxcampseoul 2011
3 Screen UX - uxcampseoul 2011
Reagan Hwang
 
사용자의 경험가치
사용자의 경험가치사용자의 경험가치
사용자의 경험가치
Reagan Hwang
 
IE9에서 HTML5 개발하기
IE9에서 HTML5 개발하기IE9에서 HTML5 개발하기
IE9에서 HTML5 개발하기
Reagan Hwang
 
Html5 ie9
Html5 ie9Html5 ie9
Html5 ie9
Reagan Hwang
 
김진우 2009 Uxeye A Unverified View From Hci Perspective
김진우 2009 Uxeye A Unverified View From Hci Perspective김진우 2009 Uxeye A Unverified View From Hci Perspective
김진우 2009 Uxeye A Unverified View From Hci Perspective
Reagan Hwang
 
Silverlight2 Security
Silverlight2 SecuritySilverlight2 Security
Silverlight2 Security
Reagan Hwang
 
Introducing Microsoft ux platforms
Introducing Microsoft ux platformsIntroducing Microsoft ux platforms
Introducing Microsoft ux platforms
Reagan Hwang
 
Introducing UX
Introducing UXIntroducing UX
Introducing UX
Reagan Hwang
 
Designing Silverlight
Designing SilverlightDesigning Silverlight
Designing Silverlight
Reagan Hwang
 
Korean Silverlight Showcases
Korean Silverlight ShowcasesKorean Silverlight Showcases
Korean Silverlight Showcases
Reagan Hwang
 
Internet Explorer 8 Beta 2 Features For Better Browsing Experience
Internet Explorer 8 Beta 2 Features For Better Browsing ExperienceInternet Explorer 8 Beta 2 Features For Better Browsing Experience
Internet Explorer 8 Beta 2 Features For Better Browsing Experience
Reagan Hwang
 
윈도우 스토어의 가능성
윈도우 스토어의 가능성윈도우 스토어의 가능성
윈도우 스토어의 가능성
Reagan Hwang
 
IE10 PP4 update for W3C HTML5 KIG
IE10 PP4 update for W3C HTML5 KIGIE10 PP4 update for W3C HTML5 KIG
IE10 PP4 update for W3C HTML5 KIG
Reagan Hwang
 
3 Screen UX - uxcampseoul 2011
3 Screen UX - uxcampseoul 20113 Screen UX - uxcampseoul 2011
3 Screen UX - uxcampseoul 2011
Reagan Hwang
 
사용자의 경험가치
사용자의 경험가치사용자의 경험가치
사용자의 경험가치
Reagan Hwang
 
IE9에서 HTML5 개발하기
IE9에서 HTML5 개발하기IE9에서 HTML5 개발하기
IE9에서 HTML5 개발하기
Reagan Hwang
 
김진우 2009 Uxeye A Unverified View From Hci Perspective
김진우 2009 Uxeye A Unverified View From Hci Perspective김진우 2009 Uxeye A Unverified View From Hci Perspective
김진우 2009 Uxeye A Unverified View From Hci Perspective
Reagan Hwang
 
Silverlight2 Security
Silverlight2 SecuritySilverlight2 Security
Silverlight2 Security
Reagan Hwang
 
Introducing Microsoft ux platforms
Introducing Microsoft ux platformsIntroducing Microsoft ux platforms
Introducing Microsoft ux platforms
Reagan Hwang
 
Designing Silverlight
Designing SilverlightDesigning Silverlight
Designing Silverlight
Reagan Hwang
 
Korean Silverlight Showcases
Korean Silverlight ShowcasesKorean Silverlight Showcases
Korean Silverlight Showcases
Reagan Hwang
 
Internet Explorer 8 Beta 2 Features For Better Browsing Experience
Internet Explorer 8 Beta 2 Features For Better Browsing ExperienceInternet Explorer 8 Beta 2 Features For Better Browsing Experience
Internet Explorer 8 Beta 2 Features For Better Browsing Experience
Reagan Hwang
 
Ad

Recently uploaded (20)

HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 

JSLounge - TypeScript 소개

  • 1. TypeScript Reagan Hwang Microsoft Korea
  • 2. Application scale JavaScript development is hard.
  • 3. TypeScript is a language for application scale JavaScript development.
  • 4. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
  • 5. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. Any browser. Any host. Any OS. Open Source.
  • 6. TypeScript • Starts with JavaScript • All JavaScript code is TypeScript code, simply copy and paste • All JavaScript libraries work with TypeScript • Optional static types, classes, modules • Enable scalable application development and excellent tooling • Zero cost: Static types completely disappear at run-time • Ends with JavaScript • Compiles to idiomatic JavaScript • Runs in any browser or host, on any OS
  • 8. Type System • Formalization of JavaScript’s types • Static representation of JavaScript’s dynamic type system • Type inference and structural typing • In practice very few type annotations are necessary • Works with existing JavaScript libraries • Declaration files can be written and maintained separately • Not “provably type safe” • Types reflect intent but do not provide guarantees
  • 10. Object types : interface
  • 12. Classes and modules • Scalable application structuring • Classes, Modules, and Interfaces enable clear contracts between components • Aligned with emerging standards • Class, Module, and Arrow Function syntax aligns with ECMAScript 6 proposals • Supports popular module systems • CommonJS and AMD modules in any ECMAScript 3 compatible environment
  • 13. Class
  • 14. Class Features class Point { class Point3D extends Point { x: number; constructor (x: number, y: number, public z: number) { private color: string; super(x, y); constructor (x: number, public y: number = 0) { } this.x = x; dist() { this.color = "red"; var d = super.dist(); } return Math.sqrt(d * d + this.z * this.z); dist() { } return Math.sqrt(this.x * this.x + this.y * this.y); } } get distance() { var p = new Point(10); return Math.sqrt(this.x * this.x + this.y * this.y); p.x = 10; } p.y = 20; static origin = new Point(0, 0); }
  • 17. TypeScript preview • Compiler • Open Source, written in TypeScript • Tooling • Visual Studio language service, browser hosted playground • Libraries • Static typing of DOM, jQuery, node.js, WinRT, WinJS, … • And More • Lots of samples and formal Language Specification
  • 18. Editors • TypeScript is available in Sublime Text, Vi, Emacs editor • http://blogs.msdn.com/b/interoperability/archive/2012/10/01/sublime- text-vi-emacs-typescript-enabled.aspx
  • 20. Visual Studio • TypeScript for Visual Studio 2012 • http://www.microsoft.com/en-us/download/details.aspx?id=34790 • Web Essentials 2012 • http://visualstudiogallery.msdn.microsoft.com/07d54d12-7133-4e15-becb- 6f451ea3bea6
  • 22. Interface 응용 interface Accumulator { clear(): void; add(x: number): void; result(): number; } function makeAccumulator():Accumulator { var sum = 0; return { clear: function () { sum = 0; }, addx: function (value: number) { sum += value; }, result: function () { return sum; } } } var a = makeAccumulator(); a.add(5);
  • 23. Definition 파일(lib.d.ts) document.onmousemove = function (e) { } onmousemove: (ev: MouseEvent) => any;
  • 24. Arrow Function Expressions • TypeScript supports arrow function expressions, a new feature planned for ECMAScript 6. Arrow function expressions are a compact form of function expressions that omit the function keyword and have lexical scoping of this. class Tracker { count = 0; start() { window.onmousemove = e => { this.count++; console.log(this.count); } } } var t = new Tracker(); t.start();
  • 25. TypeScript Roadmap • 0.8.2 • Improve the build system • Improve compiler performance • 0.8.3 • Generics • Improvements to type system to help model a larger variety of JS libraries • 0.9.x • Align with ECMAScript 6 • Community site for .d.ts files • Usability improvements to VS plugin • 1.x • A handful of language features are scheduled for exploration after the 1.0 release, including: • Async/Await • Mixins • Protected access • ES6-compatible codegen
  • 26. Ambient Declarations • document declare var document; document.title = "Hello"; // Ok because document has been declared • jQuery declare var $;
  • 27. Function Types function vote(candidate: string, callback: (result: string) => any) { // ... } vote("BigPig", function(result: string) { if (result === "BigPig") { // ... } } );
  • 28. Object Types var MakePoint: () => { x: number; y: number; };
  • 29. Resources • TypeScript Website • http://www.typescriptlang.org/#Download • Introducing TypeScript • http://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript • Introducing TypeScript: A language for application-scale JavaScript development / build conference 2012 • http://channel9.msdn.com/Events/Build/2012/3-012 • Inside TypeScript • http://channel9.msdn.com/posts/Anders-Hejlsberg-Steve-Lucco-and-Luke-Hoban-Inside-TypeScript • Introducing TypeScript / JSConf EU 2012 • http://www.youtube.com/watch?v=3UTIcQYQ8Rw • ECMAScript 6 • http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/ECMAScript-6 • Getting started: TypeScript for Windows 8 Projects using Visual Studio 2012 • http://blogs.msdn.com/b/yizhe/archive/2012/11/22/getting-started-typescript-for-windows-8-projects-using-visual- studio-2012.aspx • http://blog.tattoocoder.com/2012/10/typescript-for-windows-8-store-apps.html

Editor's Notes

  • #2: 툴 사용해보기다른 라이브러리와의 연계 보기Demo익히기Specification 읽어보기ECMAScript 6 살펴보기Demo익히기Specification 읽어보기ECMAScript 6 살펴보기다른 라이브러리와의 연계 보기툴 사용해보기