Skip to content

Instantly share code, notes, and snippets.

View phenomnomnominal's full-sized avatar
🥑
Hangry

Craig Spence phenomnomnominal

🥑
Hangry
View GitHub Profile
type Freezable = {
unfreezable?: never; // Need to make the unfreezable property optional
};
type Frozen<T extends Freezable = Freezable> = T & {
frozen: true;
};
type Thawed<T> = T extends Frozen<infer R>
? R