摘要:
Let's we have a form to submit new password. Before we send request to server, we want to force developer to valid the password before sending the req 阅读全文
摘要:
Let's imagine you're building a type helper to extract out the value from several different 'parsers'. Here are a few different examples of what a par 阅读全文
摘要:
A company has hired N interns to each join one of N different teams. Each intern has ranked their preferences for which teams they wish to join, and e 阅读全文
摘要:
Array.from() is a great way to chunk up arrays because of the secondary argument being a map function. const hugeArray = Array.from({length: 76}, (_, 阅读全文
摘要:
Since arrays are objects, we can destructure their indexes to easily grab the first and last itmes const bikes = ['bianchi', 'miele', 'miyata', 'benot 阅读全文
摘要:
For example, we have a type repersent currency: USD, value should be something like '$123', a string type with `$` and number. So let's say we make a 阅读全文