Learn some TypeScript tips to get your code up and running

Laptop screen that reads “JUST START.”
Laptop screen that reads “JUST START.”
Photo by Dayne Topkin on Unsplash.

TypeScript is an extremely popular language that continues to become more popular with every passing day. It even won the Most Adopted Technology award in the 2020 State of JS survey.

For a JavaScript developer who has never used a statically typed language before, it can seem a bit daunting. As such, I wanted to share some lessons I learned from exploring TypeScript. My hope is that these small tidbits will convince you to give it a try, assuage your concerns about getting up to speed, or better yet save you a headache or two.

Let’s begin!

1. All JavaScript Code Is (Mostly) Valid TypeScript Code

TypeScript is a…


Use functional programming concepts to write awesome APIs

a person holding a tiny valentine heart
a person holding a tiny valentine heart
Photo by Pin Adventure Map on Unsplash

I recently wrote a love letter on how functional programming concepts could be leveraged to write more declarative code. While learning more about the topic, I noticed something a bit odd. I noticed there is a lack of content on applying these concepts to APIs. So I set off on a journey to try to write the most declarative web API that I possibly could.

I am happy with the end result and want to share my approach and some learned lessons. …


Build TypeScript AWS CDK projects from the command line

Image for post
Image for post
Photo by Denis Pavlovic on Unsplash

For many companies deploying to the cloud has become a go-to strategy, and no cloud provider has become as ubiquitous as Amazon Web Services(AWS).

In the past, maintaining your infrastructure in the AWS cloud could be a bit of an onerous process. Initially, you had to configure your infrastructure through the console which made setting up and keeping aligned your infrastructure tedious and manual, especially if you were using multiple accounts.

Later, developers had the ability to define infrastructure using cloud formation templates defined in YAML and JSON. This allowed developers to share their infrastructure and, better yet, version control…


Use functional programming style to write readable code

person working at a laptop
person working at a laptop
Photo by Christina @ wocintechchat.com on Unsplash

I recently have been going down a rabbit hole of functional programming after dabbling with it for a couple of years. Functional programming has a ton of advantages. This includes functional purity (i.e., same results every time), which makes your functions easier to test. Hands down, though, the benefit I love most from functional programming is the readability gained from composing small functions together. This style is known as declarative programming.

In this article, I wanted to explore the concept of declarative programming broadly and what techniques and concepts can allow a developer to start introducing it into their codebase…


Part 2: Jumping into the deep end by converting an app

Image for post
Image for post
Photo by AltumCode on Unsplash

Note: This is this the second part in a two part tutorial. This covers a ton of material. It is recommended to read part one especially if you plan to follow along. You can read it here!

In the first part of the tutorial, we went through what ReScript is, its benefits, added the compiler to an app, and learned some of the nuances of the language and its ecosystem. In this tutorial, we will build upon that knowledge to completely rewrite an app in ReScript.

To help you easily refer back to concepts in this tutorial, we will list…


Begin writing this Facebook-backed functional programming language

Image for post
Image for post
Photo by Irvan Smith on Unsplash

Note: Part 2 of this tutorial is now available. We go over more advanced concepts like pattern matching, and utilizing third-party libraries. Click here to read it now!

Why learn ReScript?

ReScript is one of the most exciting new projects in my opinion. Announced in July 2020, this rebrand of the BuckleScript compiler promises to provide features tailored toward the JavaScript ecosystem. Like its Facebook-backed predecessor ReasonML, ReScript leverages the strong type system of OCaml to ensure that you get a robust type system with type inference, coupled with great built-in support for JSX, and blazing…


A practical tutorial teaching you all you need to use TypeScript today

Image for post
Image for post
Photo by Ferenc Almasi on Unsplash

TypeScript is one of the fastest-growing programming languages. In 2020, it became the 4th most popular language on Github. One of the appeals of TypeScript is that it is a superset of JavaScript, meaning that plain JavaScript is valid TypeScript. As a result, one of its most enticing value propositions is that you can slowly introduce TypeScript and all its benefits to an existing JavaScript codebase.

This tutorial aims to provide a practical example of how you can begin the process of adding TypeScript to your repo. My hope is that the straightforward examples in this tutorial can be used…

Jayson Alzate

Full-stack engineer working primarily in Javascript. Bootcamp grad with data analytics background and an MBA. Trying to get better every day!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store