Skip to content

Commit ffe63ce

Browse files
committed
Small changes in preparation for the Lunch-and-Learn
1 parent b2b5149 commit ffe63ce

15 files changed

+17
-17
lines changed

Introduction to TypeScript.pptx

-3.89 KB
Binary file not shown.

file02-PrimitiveTypes.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
function greeter(person: string) {
33
return "Hello, " + person;
44
}
5-
var user: string;
5+
var user: string;
66
user = 'Patrick';
77
document.body.innerHTML = greeter(user);

file03-Enumerations.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

file03-Enumerations.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

file03-Enumerations.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function ShowColorChoice(choice: Fruit) {
22
return "You chose " + choice + ', which is "' + Fruit[choice] + '".';
33
}
4-
enum Fruit { Apple, Orange, Grape };
5-
var choice: Fruit = Fruit.Apple;
4+
enum Fruit { Apple, Orange, Grape = 4};
5+
var choice: Fruit = 4;
66
document.body.innerHTML = ShowColorChoice(choice);

file04-Parameters.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

file04-Parameters.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function Welcome(firstName: string, lastName: string) {
1+
function Welcome(firstName: string, lastName?: string) {
22
var s: string = "Hello, " + firstName;
33
if (lastName) {
44
s += " " + lastName;

file05-Interfaces.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

file05-Interfaces.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

file05-Interfaces.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interface IPerson {
22
FirstName: string;
3-
LastName: string;
3+
LastName?: string;
44
}
55
function GreetPerson(p: IPerson) {
66
var s: string = "Hello, " + p.FirstName;
@@ -9,7 +9,7 @@ function GreetPerson(p: IPerson) {
99
}
1010
return s;
1111
}
12-
var p = { FirstName: "George", LastName: "Washington" };
12+
var p: IStudent = { FirstName: "George", Last_Name: "Washington", Major: "Computer Science" };
1313
document.body.innerHTML = GreetPerson(p);
1414

1515
interface IStudent extends IPerson {

index02-PrimitiveTypes.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>TypeScript Greeter</title>
4+
<title>TypeScript 02 Primitive Types</title>
55
</head>
66
<body>
77
<script src="file02-PrimitiveTypes.js"></script>

index03-Enumerations.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>TypeScript Greeter</title>
4+
<title>TypeScript 03 Enumerations</title>
55
</head>
66
<body>
77
<script src="file03-Enumerations.js"></script>

index04-Parameters.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>TypeScript Greeter</title>
4+
<title>TypeScript 04 Parameters</title>
55
</head>
66
<body>
77
<script src="file04-Parameters.js"></script>

index05-Interfaces.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>TypeScript Greeter</title>
4+
<title>TypeScript 05 Interfaces</title>
55
</head>
66
<body>
77
<script src="file05-Interfaces.js"></script>

index06-Classes.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>TypeScript Greeter</title>
4+
<title>TypeScript 06 Classes</title>
55
</head>
66
<body>
77
<script src="file06-Classes.js"></script>

0 commit comments

Comments
 (0)