Download presentation
Presentation is loading. Please wait.
Published byTeresa Campbell Modified over 9 years ago
2
Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216
9
var typeScriptBoolean: boolean = true; var typeScriptNumber: number = 10; var typeScriptString: string = "Hello World"; var anyOldType: any = "what evs";
10
var typeScriptBoolean = true; var typeScriptNumber = 10; var typeScriptString = "Hello World"; var anyOldType = "what evs";
12
enum Color { Red, Green, Blue }; var c: Color = Color.Green;
13
var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Green"] = 1] = "Green"; Color[Color["Blue"] = 2] = "Blue"; })(Color || (Color = {})); ; var c = 1 /* Green */;
15
var list: number[] = [1, 2, 3]; var list: Array = [1, 2, 3];
16
var list = [1, 2, 3];
18
interface ILabelledValue { label: string; } function printLabel(labelledObj: ILabelledValue) { console.log(labelledObj.label); } var myObj = { size: 10, label: "Size 10" }; printLabel(myObj);
19
function printLabel(labelledObj) { console.log(labelledObj.label); } var myObj = { size: 10, label: "Size 10" }; printLabel(myObj);
21
interface SearchFunc { (source: string, subString:string): boolean; } var mySearch: SearchFunc; mySearch = function(src: string, sub: string) { //some implementation return true; }
22
var mySearch; mySearch = function (src, sub) { //some implementation return true; };
24
interface ClockInterface { currentTime: Date; } class Clock implements ClockInterface { currentTime: Date; constructor(h: number, m: number) { } }
25
var Clock = (function () { function Clock(h, m) { } return Clock; })();
27
module Time { export interface ClockInterface { currentTime: Date; } export class Clock implements ClockInterface { currentTime: Date; constructor(h: number, m: number) { } }
28
var Time; (function (Time) { var Clock = (function () { function Clock(h, m) { } return Clock; })(); Time.Clock = Clock; })(Time || (Time = {}));
43
http://bka.co.nz/model-generation Contact us: aaron@bka.co.nz richard@bka.co.nz
46
Building Azure Web Apps with Node.js and the Spotify Web API [M361] Thurs 4:30pm Javascript on mobile - Cordova less of a (phone) gap than ever [M334] Wed 4:30pm ASP.NET MVC vNext with Visual Studio 2015’s new tools [M364] Fri 9:00am Universal Apps: A Developers Guide [M257] Wed 9:00am Find me later at… Hub Happy Hour Wed 5:30-6:30pm Hub Happy Hour Thu 5:30-6:30pm Closing drinks Fri 3:00-4:30pm 1 2 3 4
47
Subscribe to our fortnightly newsletter http://aka.ms/technetnz http://aka.ms/msdnnz http://aka.ms/ch9nz Free Online Learning http://aka.ms/mva Sessions on Demand
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.