Skip to content

Instantly share code, notes, and snippets.

View samrith-s's full-sized avatar
👻
Peek a boo

Samrith Shankar samrith-s

👻
Peek a boo
View GitHub Profile
@samrith-s
samrith-s / branded-tuple-elements.ts
Last active December 15, 2022 17:39
Branded tuple elements in TypeScript
/**
* Simple Brand type to give us branding. It omits the `__brand` key so that
* it does not show up in auto-complete
*/
type Brand<K, T> = T & Omit<{
__brand: K
}, '__brand'>
@samrith-s
samrith-s / nodehawk-usage-example.md
Created February 16, 2020 18:32
Nodehawk usage example

Directory structure:

- package.json
- .nodehawkrc
- src
 - server.js
// server.js