Log inSign up
ecyrbe
3,354 posts
Image
user avatar
ecyrbe
@ecyrbedev
Software Architect. effect.website core team member. Typescript ✨🪄🧙‍♂️
Ile-de-France, France
github.com/ecyrbe
Joined March 2019
208
Following
1,512
Followers
RepliesRepliesMediaMedia

New to X?

Sign up now to get your own personalized timeline!

Create account

By signing up, you agree to the Terms of Service and Privacy Policy, including Cookie Use.

Terms·Privacy·Cookies·Accessibility·Ads Info·© 2026 X Corp.
Don't miss what's happening
People on X are the first to know.
Log inSign up
  • Pinned
    user avatar
    ecyrbe
    @ecyrbedev
    Jul 4, 2023
    📢 Zodios just hit 1k ⭐! Thank you all 🙏 zodios.org #webdev #javascript #typescript
    Image
    11K
  • user avatar
    ecyrbe
    @ecyrbedev
    Nov 26, 2023
    typehero.dev is a really well crafted website to learn advanced typescript. It's 94 contributors... can't beleave so many ts wizards did it (lead by @trashh_dev). A Masterpeace!
    Image
    TypeHero
    From typehero.dev
    119K
  • user avatar
    ecyrbe
    @ecyrbedev
    Aug 24, 2022
    Replying to @bunjavascript and @oven_sh
    You can't create a business with that premise. Good Luck transitioning to a sane work culture. This is bound to fail.
  • user avatar
    ecyrbe
    @ecyrbedev
    Dec 9, 2023
    📢 Typescript tip for day 8 of #AdventOfTypescript 1⃣ For those knowing about utility types, day 8 was easy. Just use Omit 🔗typescriptlang.org/docs/handbook/… 2⃣ For those reinventing the wheel, you learned about Mapped Keys can also filter objects
    Image
    40K
  • user avatar
    ecyrbe
    @ecyrbedev
    Feb 4, 2024
    Replying to @GregMolnar
    Your chances to get a duplicate is 1 in the lifetime of the universe. And if you are concerned, roll your inserts in transactions so that they'll run again in case of failure. UUID are good for distributed databases, for preventing predictable attacks, to allow parrallelism.
    36K
  • user avatar
    ecyrbe
    @ecyrbedev
    Feb 11, 2023
    A lot of typescript wizards don't know this, but there is a way in typescript to do High Order Kinded Types: @mattpocockuk maybe a video about this would be cool
    Image
    user avatar
    ecyrbe
    @ecyrbedev
    Feb 11, 2023
    Replying to @tannerlinsley @GabrielVergnaud and @bat_splinter
    Here how to do what is in the good link with delayed types : typescriptlang.org/play?#code/JYO…
    48K
  • user avatar
    ecyrbe
    @ecyrbedev
    May 1, 2024
    📢 How to build a fully typesafe API with @EffectTS_ and effect-http - Request and Response validation and type checking - Logging - OpenTelemetry - Auto generated OpenAPI - Database 👇
    46K
  • user avatar
    ecyrbe
    @ecyrbedev
    Jul 14, 2024
    📢 Happy to announce that i'm now part of @EffectTS_ open source team core members. I'll help maintain the sql subset packages i contributed to. I'd like to thank @thefubhy and @MichaelArnaldi and the rest of effect team for welcoming me in this amazing project.
    13K
  • user avatar
    ecyrbe
    @ecyrbedev
    Nov 11, 2023
    Replying to @dillon_mulroy
    I would not say it's by the book. You have too much repetition allowing for errors everywhere. Use your data as a single source of truth. Bonus, code is easier to read and maintain : tsplay.dev/m0VjDw
    Image
    11K
  • user avatar
    ecyrbe
    @ecyrbedev
    Sep 3, 2022
    Replying to @JackEllis
    The best advice i can give you is stop micro managing your team. Do not review unless explicitly asked for. Let your team review each other ones PR and give them your trust. Even better, stop doing PRs and ask your team to do Peer programming.
  • user avatar
    ecyrbe
    @ecyrbedev
    Nov 11, 2023
    📢 Typescript tip. Evoid type and code duplication. Make types and code in sync without having to maintain both whenever you can. tsplay.dev/m0VjDw
    Image
    type RoleName = "admin" | "member";
type AdminPermission = "add-member" | "ban-member" | "delete-any-post";
type MemberPermission = "add-post" | "read-post" | "edit-post" | "delete-post";
type Permission = AdminPermission | MemberPermission;

type RoleToPermissions = {
  admin: readonly AdminPermission[];
  member: readonly MemberPermission[];
};

type Role<T extends RoleName> = Readonly<{
  role: T;
  permissions: RoleToPermissions[T];
}>;

type RolePermission = Role<"admin"> | Role<"member">;

// Internal RBAC library helper function
function getPermissionsForMember(): readonly MemberPermission[] {
  return ["add-post", "read-post", "edit-post", "delete-post"];
}

// Internal RBAC library helper function
function getPermissionsForAdmin(): readonly AdminPermission[] {
  return ["add-member", "ban-member", "delete-any-post"];
}

// Exposed RBAC library function
function getPermisisonsForRole<T extends RolePermission>(
  role: T["role"]
): T["permissions"] {
  return (
    {
      admin
    user avatar
    Dillon Mulroy
    Cloudflare
    @dillon_mulroy
    Nov 11, 2023
    Woops! Despite doing everything by the books and not using any escape hatches ('as', 'any', or 'non-null assertions') TypeScript let us give a normal 'member' admin permissions! 💥
    27K
  • user avatar
    ecyrbe
    @ecyrbedev
    Jun 28, 2023
    A screenshot speaks for itself, this is beautifull and typesafe. Writing you design system with this is so 🤯🚀 🔗panda-css.com/docs/concepts/…
    Image
    13K
  • user avatar
    ecyrbe
    @ecyrbedev
    Dec 9, 2023
    📢 Typescript tip for day 9 of #AdventOfTypescript 1⃣ You may have learned that typescript utility types can do recursion. 2⃣ recursion on types has a limit 3⃣ Solution : use Tail Recursion Optimisation 🔗 typescriptlang.org/docs/handbook/…
    Image
    10K
  • user avatar
    ecyrbe
    @ecyrbedev
    Apr 27, 2024
    📢I plan to do some @EffectTS_ feedback in the coming weeks in the form of blog posts Effect/XXX vs YYY. Examples: - Effect/schema vs Zod - Effect/rpc vs tRPC Please propose some topics and i'll add them to my todo list👇
    19K
Advertisement
Advertisement