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

Allow index node to be parsed from enumerable keys #952

Open
ssalbdivad opened this issue May 17, 2024 · 0 comments
Open

Allow index node to be parsed from enumerable keys #952

ssalbdivad opened this issue May 17, 2024 · 0 comments

Comments

@ssalbdivad
Copy link
Member

Currently, an index signature including a literal key like "a" is an error due to some limitations of how the parser is implemented. There is a normalizeIndexKey function, but it is not used when parsing a schema.

If it were integrated somehow, that logic could be removed from the primary arktype package in parseObjectLiteral and it would generally be better to reduce a type like this than throw.

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

No branches or pull requests

1 participant