jgoux
jgoux
TtRPC
Created by jgoux on 10/18/2023 in #❓-help
tRPC and OpenTelemetry
Niiiice, thanks @Thomas Ankcorn
8 replies
TtRPC
Created by jgoux on 10/18/2023 in #❓-help
tRPC and OpenTelemetry
8 replies
TtRPC
Created by jgoux on 4/8/2023 in #❓-help
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
If you do, please ping me on GitHub I'd love to contribute 🙂
24 replies
TtRPC
Created by jgoux on 4/8/2023 in #❓-help
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
(I use project references!)
24 replies
TtRPC
Created by jgoux on 4/8/2023 in #❓-help
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
I'd say the project references are meant to solve this, not paths
24 replies
TtRPC
Created by jgoux on 4/8/2023 in #❓-help
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
yes it was also suggested in the issues I linked in the discussion, it didn't work in my case
24 replies
TtRPC
Created by jgoux on 4/8/2023 in #❓-help
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
24 replies
TtRPC
Created by jgoux on 4/8/2023 in #❓-help
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
I opened a discussion about it on pnpm's repo
24 replies
TtRPC
Created by jgoux on 4/8/2023 in #❓-help
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
I needed to use pnpm's public hoisting so trpc gets installed at the root of the monorepo and satisfies TS weird resolution with symlink (which is the root cause of the error)
24 replies
TtRPC
Created by jgoux on 4/8/2023 in #❓-help
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
I actually "solved" the issue without touching the paths
24 replies
TtRPC
Created by jgoux on 4/8/2023 in #❓-help
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
To me, even in a monorepo, you should not use paths to look outside of your package boundaries
24 replies
TtRPC
Created by jgoux on 4/8/2023 in #❓-help
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
the api is installed into the client, that's why I call it a hack
24 replies
TtRPC
Created by jgoux on 4/8/2023 in #❓-help
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
but I still have to manually delete the local symlink created for it in the dependant package 🤔
24 replies
TtRPC
Created by jgoux on 4/8/2023 in #❓-help
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
I ended not touching the paths and installed my @snaplet/sdk package at the root using "@snaplet/sdk": "link:packages/sdk",
24 replies
TtRPC
Created by jgoux on 4/8/2023 in #❓-help
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
I can solve this one 👆 (type sharing between internal packages) by altering the paths of the package exporting the types, I have to make it point to the other package's real location:
"@snaplet/sdk": ["../packages/sdk"],
"@snaplet/sdk": ["../packages/sdk"],
but that's just a hack and I hate it 😂
24 replies
TtRPC
Created by jgoux on 4/7/2023 in #❓-help
No overload matches this call when outputting unions
I cast the type for now.
14 replies
TtRPC
Created by jgoux on 4/7/2023 in #❓-help
No overload matches this call when outputting unions
yeah I'm on strict 🙂
14 replies
TtRPC
Created by jgoux on 4/7/2023 in #❓-help
No overload matches this call when outputting unions
that's the plan!
14 replies
TtRPC
Created by jgoux on 4/7/2023 in #❓-help
No overload matches this call when outputting unions
It was to long for a single code block 😅
14 replies
TtRPC
Created by jgoux on 4/7/2023 in #❓-help
No overload matches this call when outputting unions
Overload 3 of 3, '(path: "database.validateUrl", procedure: CreateProcedureWithoutInput<{ user: { id: string; email: string; sub: string; entry?: string | undefined; role: "SUPERUSER" | "ADMIN" | "USER"; }; userId: string; }, {}, { success: boolean; validationErrors: ValidationErrorType; }, unknown>): Router<...>', gave the following error.
Type '({ input: { url } }: { ctx: { user: { id: string; email: string; sub: string; entry?: string | undefined; role: "SUPERUSER" | "ADMIN" | "USER"; }; userId: string; }; input: { url: string; }; type: ProcedureType; }) => { ...; } | { ...; }' is not assignable to type 'ProcedureResolver<{ user: { id: string; email: string; sub: string; entry?: string | undefined; role: "SUPERUSER" | "ADMIN" | "USER"; }; userId: string; }, undefined, InferLast<{ success: boolean; validationErrors: ValidationErrorType; }>>'.
Types of parameters '__0' and 'opts' are incompatible.
Type '{ ctx: { user: { id: string; email: string; sub: string; entry?: string | undefined; role: "SUPERUSER" | "ADMIN" | "USER"; }; userId: string; }; input: undefined; type: ProcedureType; }' is not assignable to type '{ ctx: { user: { id: string; email: string; sub: string; entry?: string | undefined; role: "SUPERUSER" | "ADMIN" | "USER"; }; userId: string; }; input: { url: string; }; type: ProcedureType; }'.
Types of property 'input' are incompatible.
Type 'undefined' is not assignable to type '{ url: string; }'
Overload 3 of 3, '(path: "database.validateUrl", procedure: CreateProcedureWithoutInput<{ user: { id: string; email: string; sub: string; entry?: string | undefined; role: "SUPERUSER" | "ADMIN" | "USER"; }; userId: string; }, {}, { success: boolean; validationErrors: ValidationErrorType; }, unknown>): Router<...>', gave the following error.
Type '({ input: { url } }: { ctx: { user: { id: string; email: string; sub: string; entry?: string | undefined; role: "SUPERUSER" | "ADMIN" | "USER"; }; userId: string; }; input: { url: string; }; type: ProcedureType; }) => { ...; } | { ...; }' is not assignable to type 'ProcedureResolver<{ user: { id: string; email: string; sub: string; entry?: string | undefined; role: "SUPERUSER" | "ADMIN" | "USER"; }; userId: string; }, undefined, InferLast<{ success: boolean; validationErrors: ValidationErrorType; }>>'.
Types of parameters '__0' and 'opts' are incompatible.
Type '{ ctx: { user: { id: string; email: string; sub: string; entry?: string | undefined; role: "SUPERUSER" | "ADMIN" | "USER"; }; userId: string; }; input: undefined; type: ProcedureType; }' is not assignable to type '{ ctx: { user: { id: string; email: string; sub: string; entry?: string | undefined; role: "SUPERUSER" | "ADMIN" | "USER"; }; userId: string; }; input: { url: string; }; type: ProcedureType; }'.
Types of property 'input' are incompatible.
Type 'undefined' is not assignable to type '{ url: string; }'
14 replies