Closed ldruschk closed 1 year ago
Looks like you cant actually inspect the function name as I intended, passing the parameter name via decorator args seems like a better way to go about this anyways. Prototype in #27, waiting for CI to test. Thoughts? Would definitely need a version bump.
Currently the return type annotation is the only way of knowing which dependency to inject. If we also use the parameter name then this must be parsable from the getter function sig like "_get_dependency_io_Session" for a parameter name of "io" with return type "Session". Specifying only the parameter name would cause problems with parameters of different types but same name (e.g. io: AsyncSocket and io: MyCustomSocket). Might be a bit restrictive, what do you think?