Loading
Build a TypeScript Project From Scratch Tutorial (19 exercises)
Lesson

Write Implementation in Excalidraw

In this lesson, you’ll write the library implementation details at high-level using Excalidraw.

Resources

The following resources provide more information for this lesson:

Transcript

Instructor: [0:00] Another important step in designing a library is figuring out the implementation details from a high level. We'll be using my favorite tool, Excalidraw. For this challenge, I want you to create a flowchart for our library. Here's an example from Day.js. A user calls Day.js. Then the flow is, do they call the value method? If yes, transform with method. If no, return the Day.js object.
[0:24] In case you're not familiar, this is what Day.js looks like. Below I've outlined a couple things you may want to account for in your flowchart. Now pause the video. Take two minutes to do this. Then come back. We'll discuss.

[0:37] All right. Welcome back. Here's the flowchart that I came up with. This is how streak counter will work. The app calls streak counter. We say, "Hey. Does the streak exist?" If yes, then we either update the streak or reset it. We return the updated streak. If it doesn't exist, we initialize and return. Now let's get into some real coding in the next video.