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

Issue with keyof #2145

Open
vivdesign opened this issue Jan 3, 2025 · 1 comment
Open

Issue with keyof #2145

vivdesign opened this issue Jan 3, 2025 · 1 comment

Comments

@vivdesign
Copy link

Hello,
first of all thanks for the great library.

Now I'm having an issue I don't understand I have class that has a property called fn, this property is an object of functions I need to generate an enum from in my type so I do this
type myFunctions = keyof myClass['fn']
but I get this error:
LogicError: Invalid index "fn" in type "class-1549443271-162-586-1549443271-0-587"
at (node_modules\ts-json-schema-generator\src\NodeParser\IndexedAccessTypeNodeParser.ts:81:27)
at Array.map ()

Could anyone assist I don't understand what I'm doing wrong?

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

2 participants
@vivdesign and others