Replies: 1 comment 7 replies
-
No you can't 😅 declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void; |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently you have to define arguments like this:
why isn't the API like this instead?
You can always get the name of the decorated argument-it's the second parameter in the decorator function. Why does typegraphql insist on me writing the name twice when it can get the name from it?
Arg decorator is implemented like this in decapi for example: https://github.com/capaj/decapi/blob/946c15853c7b8c2846c7fa12fb7bb43f39307299/src/domains/arg/ArgDecorators.ts#L6
Beta Was this translation helpful? Give feedback.
All reactions