\r\n```\r\n result in \r\n \r\n ```\r\nType 'SerializeObject\u003CUndefinedToOptional\u003C{ source?: \"organic\" | \"organic-invite\" | \"organic-invite-pending\" | \"admin-invite\"; title?: userTitles; _uui\r\nd?: string; created_by?: string; invited_by?: unknown; isVerified?: boolean; ... 12 more ...; ssoSignup: boolean; }>>' is not assignable to type '{ source?: \"organic\" | \"organic-invite\" | \"organic-invite-pending\" | \"ad\r\nmin-invite\"; title?: userTitles; _uuid?: string; created_by?: string; invited_by?: unknown; isVerified?: boolean; ... 12 more ...; ssoSignup: boolean; }'.\r\n Types of property 'nameInfo' are incompatible.\r\n Type 'SerializeObject\u003CUndefinedToOptional\u003C{ firstName: string; lastName: string; }>>' is not assignable to type '{ firstName: string; lastName: string; }'.\r\n Property 'firstName' is optional in type 'SerializeObject\u003CUndefinedToOptional\u003C{ firstName: string; lastName: string; }>>' but required in type '{ firstName: string; lastName: string; }'.\r\n\r\n47 \u003CMyChildComponent user={user} />\r\n\r\n```\r\n \r\n\r\n\r\nI'm assuming this was introduced in [10.2.0](https://github.com/trpc/trpc/releases/tag/v10.2.0) maybe?\r\n\r\n\r\n### Link to reproduction\r\n\r\nhttps://stackblitz.com/edit/github-4mkvan?file=src/pages/index.tsx\r\n\r\n*** Edit ***\r\nI was able to reproduce on stackblitz but now after a small cleanup the error is gone and I can't reproduce :/ \r\nTrying to reproduce again\r\n\r\n### To reproduce\r\n\r\nThe user passed down to the child component triggers a typescript error in src/pages/index.tsx in the provided example\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### 👨👧👦 Contributing\r\n\r\n- [ ] 🙋♂️ Yes, I'd be down to file a PR fixing this bug!",[3102,3103],{"name":3067,"color":3068},{"name":3070,"color":3071},3307,"bug: SerializeObject\u003CUndefinedToOptional\u003CX>> is incompatible","2022-12-15T18:01:55Z","https://github.com/trpc/trpc/issues/3307",0.7224377,{"description":3110,"labels":3111,"number":3118,"owner":3021,"repository":3021,"state":3023,"title":3119,"updated_at":3120,"url":3121,"score":3122},"This is a super weird one. It may have been me who broke it, and I haven't been able to figure out how/why yet. My team's project hits this error trying to update to v9.6.0 (from v9.0.0-alpha.0, which was before #915 went in but after/somewhere in the middle of #718).\r\n\r\nWe're finding that *under certain conditions* `inferProcedureInput\u003C>` is returning `unknown` (in fact, it's the type inference of router definition - the procedure itself is `Procedure\u003CContext, Context, unknown, { ...result... }>`). Repro (note - this does _not_ repro in this repo, if you do `import * as trpc from '../src'` in a test, which is what I tried first. You can use this [playground link](https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgUwB5mQYxgFQJ4YDyAZnAL5zFQQhwDkaG2AtDAcnQNwBQokscAFRwAhgGc4MKGEyVqtOgAEpMgPRjkUAG6a6vcNHgIAXhSo16xiABM93TBAB2Y+CLBgAShACuMTXABeSWlMADpqX00ACgBKUJBNAHNkKO44ehFrEGBHVToAGjTgmSL08J8-KFjSuHjfERhgJyi6PxcAWXrGpwLEGvScsF8ALjhjUIgAIwArLBgohH70yggIUfGXKBzE2MLl5bIYvf24KGQxCAAbHVHxPEdZBbhB33IYwIA+OAADABIEF4wULEVZkACE32O6UONXiwGs1kuyAA7iIzlE7g84E9HGh4IdPnBcah5jEjtwYjxuGwMHBOjAGk1nIFJOwIKQ3J4KppQgB9azIYh1BndZw8RhzfBEYgAHiKKjCOWImgACtRMMhrN4zgBJRxDGAy+mMpxiADadEy2VybRgxtFdAAuh9uB9YqEYBAAKIAR28IkuUuQJBlSBBazgm225DdlO4EuwQZD8pCoSVqvVmu1yD1BqNXSZ5stWRyqlt9qZTpdsdCjggQM9ACFkABVRwAazryMcsR4QA) to see it going wrong:\r\n\r\n```ts\r\nimport { expectTypeOf } from 'expect-type';\r\nimport * as trpc from '@trpc/server'\r\nimport {z} from 'zod'\r\n\r\nconst appRouter = trpc.router().merge(\r\n 'admin/',\r\n trpc\r\n .router()\r\n .mutation('testMutation', {\r\n input: z.object({\r\n foo: z.string(),\r\n }),\r\n resolve: async ({ input }) => `${input.foo}!`,\r\n })\r\n .middleware(async ({ next }) => next()),\r\n);\r\n\r\ntype Mutations = typeof appRouter._def.mutations;\r\n\r\nexpectTypeOf\u003C\r\n trpc.inferProcedureInput\u003CMutations['admin/testMutation']>\r\n>().toEqualTypeOf\u003C{ foo: string }>();\r\n\r\nexpectTypeOf\u003C\r\n trpc.inferProcedureInput\u003CMutations['admin/testMutation']>\r\n>().not.toBeUnknown();\r\n```\r\n\r\nThe two `expectTypeOf` tests fail. The second is just to show that the inferred type is `unknown` and that it isn't a typo/bad test setup.\r\n\r\nUpdate: The tests succeed if you remove the `.middleware(async ({ next }) => next())` line (in this case, the middleware is pointless - we are seeing it for a similar middleware that throws under certain circumstances)\r\n\r\nUpdate 2: It can also be repro'd by doing `import * as trpc from '../dist/trpc-server.cjs'` in this repo, which makes things much easier. Could there be some types that are being stripped at build time, maybe?",[3112,3115],{"name":3113,"color":3114},"🐛 bug","d73a4a",{"name":3116,"color":3117},"🧙🏻 typescript wizardry","391441",949,"`inferProcedureInput` broken in published package","2022-10-04T18:08:21Z","https://github.com/trpc/trpc/issues/949",0.7231662,["Reactive",3124],{},["Set"],["ShallowReactive",3127],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f-cB9SE7kp726-t8LmAVX5b3fZwCo-RqjWNJVAiJRmE4":-1},"/trpc/trpc-openapi/57"]