Skip to content

Commit ad3cf7b

Browse files
committed
object typos
1 parent 3a7a725 commit ad3cf7b

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Chapter2/Section1-Understanding-TypeScript/calculateTotalPrice.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function calculateTotalPrice(
2-
product: { name: string, unitPrice: number },
2+
product: { name: string; unitPrice: number },
33
quantity: number,
44
discount: number
55
) {

Chapter2/Section3-Creating-types/Creating-interfaces/code.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ interface Purchase {(quantity: number): void}
33
interface Product {
44
name: string;
55
unitPrice?: number;
6-
purchase: Purchase,
6+
purchase: Purchase;
77
}
88
let table: Product = {
99
name: "Table",

Chapter2/Section3-Creating-types/Creating-type-aliases/code.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
type Purchase = (quantity: number) => void;
2-
type Product = { name: string, unitPrice?: number, purchase: Purchase };
2+
type Product = { name: string; unitPrice?: number; purchase: Purchase };
33

44
let table: Product = {
55
name: "Table",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// let table = {name: "Table", unitPrice: 450};
1+
// let table = {name: "Table"; unitPrice: 450};
22
// table.discount = 10;
33

4-
const table: { name: string, unitPrice?: number } = {
4+
const table: { name: string; unitPrice?: number } = {
55
name: "Table",
66
};
77

0 commit comments

Comments
 (0)