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

Can't get correct types extending SchemaDirectiveVisitor #1298

Closed
ilatovsky opened this issue Mar 20, 2020 · 1 comment
Closed

Can't get correct types extending SchemaDirectiveVisitor #1298

ilatovsky opened this issue Mar 20, 2020 · 1 comment

Comments

@ilatovsky
Copy link

Issue

Couldn't get correct types when i wrote own directive handler.
If i extend from SchemaDirectiveVisitor class MyDirective extends SchemaDirectiveVisitor
this.args is always resolved by typescript as {[name: string]: any;}

Suggestion

Rewrite SchemaDirectiveVisitor as Generic to provide args, context and schema types for inherited classes

@yaacovCR
Copy link
Collaborator

yaacovCR commented Apr 1, 2020

Fold into #1306

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