Skip to content

Commit 529e8d9

Browse files
committed
fix: add export {} to make files modules and fix typecheck errors
1 parent 331efe4 commit 529e8d9

File tree

3 files changed

+10
-4
lines changed
  • exercises
    • 03.primitive-types/01.problem.numbers-and-strings
    • 04.control-flow

3 files changed

+10
-4
lines changed

exercises/03.primitive-types/01.problem.numbers-and-strings/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
// 💰 Use backticks ` and ${variable} syntax
1313

1414
// ✅ These console.logs will verify your work
15-
// @ts-expect-error - 💣 remove this comment
1615
console.log('Price:', price)
17-
// @ts-expect-error - 💣 remove this comment
16+
// @ts-expect-error - 💣 remove this comment once you create the productName variable
1817
console.log('Product:', productName)
19-
// @ts-expect-error - 💣 remove this comment
18+
// @ts-expect-error - 💣 remove this comment once you create the quantity variable
2019
console.log('Quantity:', quantity)
21-
// @ts-expect-error - 💣 remove this comment
20+
// @ts-expect-error - 💣 remove this comment once you create the description variable
2221
console.log('Description:', description)
2322

2423
// 🦺 This line ensures TypeScript treats this as a module
24+
export {}

exercises/04.control-flow/02.problem.loops/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ const prices: Array<number> = [29.99, 9.99, 49.99, 4.99, 19.99]
1818

1919
// console.log(`Total: $${total.toFixed(2)}`)
2020
// console.log(`Expensive items (>$10): ${expensiveItemCount}`)
21+
22+
// 🦺 This line ensures TypeScript treats this as a module
23+
export {}

exercises/04.control-flow/03.problem.for-of-iteration/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ const prices: Array<number> = [29.99, 9.99, 49.99, 4.99, 19.99]
2020
// console.log(`Total: $${total.toFixed(2)}`)
2121
// console.log(`Average: $${average.toFixed(2)}`)
2222
// console.log(`Highest: $${highestPrice.toFixed(2)}`)
23+
24+
// 🦺 This line ensures TypeScript treats this as a module
25+
export {}

0 commit comments

Comments
 (0)