Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keyof on object with over 47 keys gives TS2589: Type instantiation is excessively deep and possibly infinite #982

Open
andersk opened this issue Dec 15, 2024 · 0 comments

Comments

@andersk
Copy link

andersk commented Dec 15, 2024

import * as v from 'valibot';

const object_schema = v.object({
  key0: v.unknown(),
  key1: v.unknown(),
  
  key62: v.unknown(),
  key63: v.unknown(),
});
const key_schema = v.keyof(object_schema);
test.ts:69:20 - error TS2589: Type instantiation is excessively deep and possibly infinite.

69 const key_schema = v.keyof(object_schema);
                      ~~~~~~~~~~~~~~~~~~~~~~


Found 1 error in test.ts:69

Playground link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant