Important clarification π
`satisfies` does NOT affect runtime behavior
It:
β’ Does NOT merge objects
β’ Does NOT override values
β’ Is purely a type-checking feature
Posts by Ugi Stelmokaitis
β
satisfies operator (TS 4.9+)
βοΈ Enforces the shape
βοΈ Preserves literal types ("#5a58f2")
βοΈ Better autocomplete & inference
β Type annotation (: ThemeSchema)
This narrows the object to ThemeSchema
β‘οΈ hex becomes string
β‘οΈ Literal types are lost
β‘οΈ Worse inference
Been working on a Design System and ran into a great TypeScript nuance thatβs easy to miss π
The difference between : ThemeSchema vs satisfies ThemeSchema π§΅β¬οΈ
Switch Toggle π
Link to #codepen π
Team Section β¨
#Codepen π codepen.io/ugi-dev/pen...
CardStack Interaction π
Smooth shuffle animation using #GSAP. The details are key - timing, easing, and that satisfying snap.
What do you think? Any details you'd tweak?
Link to CodePen π
Dark code snippet showing "r.profile.name = "Bob";" with a red cross and "compile error" indicating assignment to a readonly property fails.
Now π
Dark code editor showing a TypeScript recursive DeepReadonly<T> conditional type and a User type with id and nested profile name.
β Do: Recursive conditional type
Dark code editor showing a single TypeScript line defining a type alias: "type ReadonlyUser = Readonly<User>;" with highlighted keywords.
Typescript πΉ
β Don't: Shallow readonly.
This is top level readonly
Result π
β Do: Conditional union filtering
πΉ Conditional Types to Filter Union Types
β Donβt: Manually redefine unions
Carousel animation made with #GSAP #React #Animation β¨
#X Space interaction ποΈ
Good UI feels boring in a good way π
Daily goal β
#codepen link π codepen.io/ugi-dev/pen...
#Nextjs always delivers β fast, efficient, and future proof! β‘
My personal website scored a perfect 100/100 on all Lighthouse performance metrics π
ugi.dev
Fingerprint Scanner π«
Made with GSAP #codepen bellow π
Booking Confirmation π« π«
Made with #GSAP
Cooking something cool β¨π
Interactive Cards β¨
Link to #codepen bellow π