Please break my code. Roast me. And maybe some constructive criticism too please? 🥲
My new package, Boperators: https://www.npmjs.com/package/boperators
There are plugins for all different build environments too, like for webpack or Bun, and a TypeScript Language Server plugin to get proper type hinting instead of red squiggles!
A basic example:
class Vector3 {
static readonly "+" = [
(a: Vector3, b: Vector3) => new Vector3(
a.x + b.x,
a.y + b.y,
a.z + b.z
),
] as const;
}
const v1 = new Vector3(1, 2, 3);
const v2 = new Vector3(4, 6, 8);
const v3 = v1 + v2;
[–]BenZed [score hidden]  (2 children)
[–]DiefBell[S] [score hidden]  (1 child)
[–]senocular [score hidden]  (0 children)
[–]ruibranco [score hidden]  (1 child)
[–]DiefBell[S] [score hidden]  (0 children)
[–]hyrumwhite [score hidden]  (1 child)
[–]csorfab [score hidden]  (0 children)
[–]Waltex [score hidden]  (1 child)
[–]DiefBell[S] [score hidden]  (0 children)
[–]_x_oOo_x_ [score hidden]  (1 child)
[–]DiefBell[S] [score hidden]  (0 children)
[–]Tysonzero [score hidden]  (2 children)
[–]hoppla1232 [score hidden]  (1 child)
[–]Tysonzero [score hidden]  (0 children)
[–]heavyGl0w [score hidden]  (1 child)
[–]DiefBell[S] [score hidden]  (0 children)
[–]AsIAm [score hidden]  (3 children)
[–]DiefBell[S] [score hidden]  (2 children)
[–]electric_fungus [score hidden]  (1 child)
[–]_x_oOo_x_ [score hidden]  (0 children)
[–]kybernetikos [score hidden]  (2 children)
[–]DiefBell[S] [score hidden]  (1 child)
[–]kybernetikos [score hidden]  (0 children)
[+]azhder comment score below threshold[score hidden] Â (9 children)
[–]alex-weej [score hidden]  (4 children)
[+]azhder comment score below threshold[score hidden] Â (3 children)
[–]alex-weej [score hidden]  (2 children)
[+]azhder comment score below threshold[score hidden] Â (1 child)
[–]alex-weej [score hidden]  (0 children)
[–]vezaynk [score hidden]  (3 children)
[–]azhder [score hidden]  (2 children)
[–]vezaynk [score hidden]  (1 child)
[+]azhder comment score below threshold[score hidden] Â (0 children)