Presentation is loading. Please wait.

Presentation is loading. Please wait.

Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216.

Similar presentations


Presentation on theme: "Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216."— Presentation transcript:

1 Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216

2

3

4

5

6 var typeScriptBoolean: boolean = true; var typeScriptNumber: number = 10; var typeScriptString: string = "Hello World"; var anyOldType: any = "what evs";

7 var typeScriptBoolean = true; var typeScriptNumber = 10; var typeScriptString = "Hello World"; var anyOldType = "what evs";

8 enum Color { Red, Green, Blue }; var c: Color = Color.Green;

9 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 */;

10 var list: number[] = [1, 2, 3]; var list: Array = [1, 2, 3];

11 var list = [1, 2, 3];

12 interface ILabelledValue { label: string; } function printLabel(labelledObj: ILabelledValue) { console.log(labelledObj.label); } var myObj = { size: 10, label: "Size 10" }; printLabel(myObj);

13 function printLabel(labelledObj) { console.log(labelledObj.label); } var myObj = { size: 10, label: "Size 10" }; printLabel(myObj);

14 interface SearchFunc { (source: string, subString:string): boolean; } var mySearch: SearchFunc; mySearch = function(src: string, sub: string) { //some implementation return true; }

15 var mySearch; mySearch = function (src, sub) { //some implementation return true; };

16 interface ClockInterface { currentTime: Date; } class Clock implements ClockInterface { currentTime: Date; constructor(h: number, m: number) { } }

17 var Clock = (function () { function Clock(h, m) { } return Clock; })();

18 module Time { export interface ClockInterface { currentTime: Date; } export class Clock implements ClockInterface { currentTime: Date; constructor(h: number, m: number) { } }

19 var Time; (function (Time) { var Clock = (function () { function Clock(h, m) { } return Clock; })(); Time.Clock = Clock; })(Time || (Time = {}));

20

21

22

23

24

25

26

27

28 http://bka.co.nz/model-generation Contact us: aaron@bka.co.nz

29

30

31 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

32


Download ppt "Leveraging TypeScript in Cross-functional development teams Aaron McGee, Richard Brookes M216."

Similar presentations


Ads by Google