Snippets
A collection of solutions to small problems I've faced in the past. They're all copy-paste ready 😉
DistributiveOmit
Custom omit type that omits a property from all members, preserving union types.
Literal Union
Loosen and strictify a literal union type.
NPM - Set version to latest
How to set a published package version to latest
Playwright - Clipboard
How to do copy and paste with Playwright
Set File Input Value
How to set a value on a file input element using programmatically.
Union to Intersection
Convert union to intersection types
Use Emotion in an iframe
How to set up Emotion to work within an iframe
useEffectRef
Perform disposable side-effects when an element's node is connected.
useInterval
A react-friendly alternative to window.setInterval