feathers icon indicating copy to clipboard operation
feathers copied to clipboard

Type instantiation is excessively deep and possibly infinite

Open digitalcortex opened this issue 2 years ago • 1 comments

Steps to reproduce

Github repository: https://github.com/digitalcortex/feathers-dove-typebox-bug

Expected behavior

No Typescript errors, properly merged types.

Actual behavior

Typescript error Type instantiation is excessively deep and possibly infinite.ts(2589)

System configuration

Please check package.json in the repo above.

NodeJS version: v18.11.0

TypeScript version: ^4.9.3

Operating System: Mac OS

digitalcortex avatar Jan 12 '23 21:01 digitalcortex

Looks like the error is caused by having moneyTransferServices on both userDataSchema and userSchema. I was able to fix the error by changing the following line in userDataSchema

Type.Partial(userSchema),

to

Type.Omit(Type.Partial(userSchema), ["moneyTransferServices"]),

howlettt avatar Jan 31 '23 04:01 howlettt