Itβs just three files: package.json, tsconfig.json and a utilities file, and youβre good to go. As someone on Hacker News said: βSometimes the most valuable guide is a working example.β The associated comment thread is worth checking out for some extra background, too.
π₯³ Talking of which, TypeScript 5.3 has been released. It supports the latest updates to the import attributes proposal, has enhanced type narrowing in numerous contexts, provides interactive inlay hints for types in the editor, and more.
KHALID ZOABI
Please open Telegram to view this post
VIEW IN TELEGRAM
π€©5π3π₯1
Please open Telegram to view this post
VIEW IN TELEGRAM
π2
π₯6π4β€2
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£35β€4π₯3π2π€©1
let a = 1;
{
let a = 2;
}
a+=1;
console.log(a);
Please open Telegram to view this post
VIEW IN TELEGRAM
π21π₯3
π24β€6π₯4π€©3π€£2
Which challenge template do you prefer?
Anonymous Poll
35%
Old one (images)
65%
New one (code, copyable)
π€©12π8β€5π€1
const asyncFunction = async () => {
try {
await Promise.reject("Oops!");
} catch (error) {
return "Caught: " + error;
} finally {
return "Finally block executed";
}
};
asyncFunction().then(result => console.log(result));
Please open Telegram to view this post
VIEW IN TELEGRAM
π14β€5π₯5
What is the output
Anonymous Quiz
12%
Error
14%
[object Promise]
44%
"Finally block executed"
29%
"Caught: Oops!"
β€2
This media is not supported in your browser
VIEW IN TELEGRAM
Why Should You β This?
Because it's not just an empty repository; it's an existential experience. By starring, you become part of the nothingness revolution. Join us in the pursuit of emptiness!
https://github.com/nairihar/the-most-starred-readme
Because it's not just an empty repository; it's an existential experience. By starring, you become part of the nothingness revolution. Join us in the pursuit of emptiness!
https://github.com/nairihar/the-most-starred-readme
Please open Telegram to view this post
VIEW IN TELEGRAM
π₯8π€©6β€2π€2
const emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
const emails = ["[email protected]", "john.doe@gmail.", "invalid-email", "[email protected]"];
const validEmails = emails.filter(email => emailPattern.test(email));
console.log(validEmails);
Please open Telegram to view this post
VIEW IN TELEGRAM
What is the output?
Anonymous Quiz
9%
[]
33%
["[email protected]", "john.doe@gmail.", "invalid-email", "[email protected]"]
19%
["[email protected]", "john.doe@gmail."]
39%
["[email protected]", "[email protected]"]
β€15π₯7π€4π2π€£2
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£43π7π₯6
function asyncFunction(value) {
return new Promise(resolve => {
setTimeout(() => {
console.log(value);
resolve(value);
}, 1000);
});
}
(async () => {
const results = await Promise.all([asyncFunction(1), asyncFunction(2), asyncFunction(3)]);
console.log(results);
})();
Please open Telegram to view this post
VIEW IN TELEGRAM
π14
What is the output?
Anonymous Quiz
50%
1, 2, 3, [1, 2, 3]
27%
[1, 2, 3], 1, 2, 3
15%
1, 1, 1, [1, 2, 3]
8%
1, 2, 3, [3, 3, 3]
π₯9π€6π4β€2
Please open Telegram to view this post
VIEW IN TELEGRAM
π€23π€£20β€3π1π€©1
for (var i = 0; i < 3; i++) {
const log = () => {
console.log(i)
}
setTimeout(log, 100)
}
Please open Telegram to view this post
VIEW IN TELEGRAM
π6π₯2β€1
π€£21π₯8π€6β€4π2
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£46π€6β€2π₯2π1
var a = 1
function output () {
console.log(a)
var a = 2
console.log(a)
}
console.log(a)
output()
console.log(a)
Please open Telegram to view this post
VIEW IN TELEGRAM
π€£15π6β€1π₯1