-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
getting types of function arguments in Interceptor hooks #14
Comments
Hit the wrong button there. Sorry. |
No worries. This property will expose I would rather not override the original argTypes so I don't break existing code. |
(Sorry for the delay here.) How about something like |
(But we should ideally wait until @gebing's TypeScript porting efforts are complete.) |
I think the convert between native and javascript is also very useful for processing native export functions, so in my utility code, i ported the @oleavr |
the only way I can find to get the types of arguments to functions in hooks (or from the function signature in general) is using the argumentTypes property.
this property strips away reader and writer information leaving you only with the type of data, namely 'pointer', 'boolean' etc.
while this works find for basic types, it inhibits deep inspection of objects, since all pointer types get the type of 'pointer':
an Object (encoded as @) is a pointer.
a char * (encoded *) is a pointer.
a block (@?) is also just a pointer.
the information is ready and used while parsing the function signature and reading the arguments, it would be great if it could be exposed through argumentTypes as well.
The text was updated successfully, but these errors were encountered: