File tree Expand file tree Collapse file tree 7 files changed +23
-17
lines changed
01.problem.numbers-and-strings
02.problem.booleans-and-comparisons
02.variables/01.problem.let-and-const
05.void-and-never/02.problem.never-type Expand file tree Collapse file tree 7 files changed +23
-17
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export default [
88 languageOptions : {
99 parserOptions : {
1010 projectService : false ,
11- project : './tsconfig.eslint. json' ,
11+ project : './tsconfig.json' ,
1212 tsconfigRootDir : import . meta. dirname ,
1313 } ,
1414 } ,
Original file line number Diff line number Diff line change 1212// 💰 Use backticks ` and ${variable} syntax
1313
1414// ✅ These console.logs will verify your work
15+ // @ts -expect-error - 💣 remove this comment
1516console . log ( 'Price:' , price )
17+ // @ts -expect-error - 💣 remove this comment
1618console . log ( 'Product:' , productName )
19+ // @ts -expect-error - 💣 remove this comment
1720console . log ( 'Quantity:' , quantity )
21+ // @ts -expect-error - 💣 remove this comment
1822console . log ( 'Description:' , description )
1923
2024// 🦺 This line ensures TypeScript treats this as a module
Original file line number Diff line number Diff line change @@ -15,9 +15,13 @@ const stockCount: number = 100
1515// 💰 Use the && operator
1616
1717// ✅ Verification
18+ // @ts -expect-error - 💣 remove this comment
1819console . log ( 'Is Available:' , isAvailable )
20+ // @ts -expect-error - 💣 remove this comment
1921console . log ( 'Is On Sale:' , isOnSale )
22+ // @ts -expect-error - 💣 remove this comment
2023console . log ( 'Has Discount:' , hasDiscount )
24+ // @ts -expect-error - 💣 remove this comment
2125console . log ( 'Can Purchase:' , canPurchase )
2226
2327export { }
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ const laptopPrice = 999.99
2020// 🐨 Try uncommenting the line below - what happens?
2121// TAX_RATE = 0.10
2222
23+ // @ts -expect-error - 💣 remove this comment
2324console . log ( 'Cart subtotal:' , cartTotal )
2425// console.log('Tax:', cartTotal * TAX_RATE)
2526// console.log('Final total:', finalTotal)
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ type Status = 'pending' | 'success' | 'error'
1616
1717// 🐨 Complete this function to handle all cases
1818// The default case should use the never exhaustiveness pattern
19+ // @ts -expect-error - 💣 remove this comment
1920function getStatusMessage ( status : Status ) : string {
2021 switch ( status ) {
2122 case 'pending' :
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11{
2- "files" : [],
3- "exclude" : [" node_modules" ],
4- "references" : []
2+ "compilerOptions" : {
3+ "target" : " ES2022" ,
4+ "module" : " ESNext" ,
5+ "moduleResolution" : " bundler" ,
6+ "esModuleInterop" : true ,
7+ "strict" : true ,
8+ "skipLibCheck" : true ,
9+ "noEmit" : true ,
10+ "allowImportingTsExtensions" : true
11+ },
12+ "include" : [" **/*.ts" , " **/*.tsx" ],
13+ "exclude" : [" node_modules" , " **/node_modules" ]
514}
You can’t perform that action at this time.
0 commit comments