elysiajs / elysia-trpc

A plugin for Elysia that add support for using tRPC
MIT License
20 stars 17 forks source link

turn on noUncheckedIndexedAccess rule in tsconfig #7

Open danadajian opened 12 months ago

danadajian commented 12 months ago

When setting noUncheckedIndexedAccess to true in a project consuming this library, type errors ensue:

node_modules/@elysiajs/trpc/src/index.ts:19:17 - error TS2339: Property 'path' does not exist on type 'ValueError | undefined'.

19         const { path, message } = [...check.Errors(value)][0]
                   ~~~~

node_modules/@elysiajs/trpc/src/index.ts:19:23 - error TS2339: Property 'message' does not exist on type 'ValueError | undefined'.

19         const { path, message } = [...check.Errors(value)][0]
                         ~~~~~~~

Found 6 errors in 3 files.

Errors  Files
     2  node_modules/@elysiajs/trpc/src/index.ts:19