2022-04-06
1584
#typescript
Oloruntobi Awoderu
102542
Apr 6, 2022 ⋅ 5 min read

The definitive guide to typing functions in TypeScript

Oloruntobi Awoderu Passionate software engineer thriving on product-oriented and efficient solutions to problems that aid people in their everyday lives.

Recent posts:

why you should ci cd your project from day one

Why you should set up CI/CD from day one for your apps

CI/CD isn’t optional anymore. Discover how automated builds and deployments prevent costly mistakes, speed up releases, and keep your software stable.

Lewis Cianci
Nov 28, 2025 ⋅ 9 min read

Top 5 AI code review tools in 2025

A quick comparison of five AI code review tools tested on the same codebase to see which ones truly catch bugs and surface real issues.

Emmanuel John
Nov 27, 2025 ⋅ 7 min read
css corner shape property

How to create fancy corners using CSS corner-shape

Learn about CSS’s corner-shape property and how to use it, as well as the more advanced side of border-radius and why it’s crucial to using corner-shape effectively.

Daniel Schwarz
Nov 26, 2025 ⋅ 7 min read
the replay graphic november 26

The Replay (11/26/25): An AI reality check, Prisma v7, and more

An AI reality check, Prisma v7, and “caveman compression”: discover what’s new in The Replay, LogRocket’s newsletter for dev and engineering leaders, in the November 26th issue.

Matt MacCormack
Nov 26, 2025 ⋅ 35 sec read
View all posts

One Reply to "The definitive guide to typing functions in TypeScript"

  1. You can call async function directly using IIFE

    (async function(){
    const getFruit = await getFruitById(11);
    console.log(getFruit)
    })();

Leave a Reply

Would you be interested in joining LogRocket's developer community?

Join LogRocket’s Content Advisory Board. You’ll help inform the type of content we create and get access to exclusive meetups, social accreditation, and swag.

Sign up now