Skip to content

Instantly share code, notes, and snippets.

View hazemtarekelaswad's full-sized avatar
:octocat:

Hazem Tarek Elaswad hazemtarekelaswad

:octocat:
View GitHub Profile
@hazemtarekelaswad
hazemtarekelaswad / promise.ts
Created March 20, 2024 22:59
Basic Promise implementation in Node.js
enum PromiseStatus {
PENDING,
RESOLVED,
REJECTED
};
type executorType = (
resolve: (val: any) => void,
reject: (val: any) => void
) => void