-
Notifications
You must be signed in to change notification settings - Fork 428
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
Dynamically declare *Target
properties with TS
#723
Comments
Hey @mlwyatt, I know this might not be exactly what you are looking for, but I find the pattern proposed in the |
Thanks for reaching out! I agree that it's elegant but it's also a bit outdated (no support for outlets) and not quite what I'm after. I think what I want just isn't possible with the current state of TS |
@mlwyatt give this a go |
I've looked over #121 and #466 and while they are similar, they aren't quite what I'm looking for. I know when using TS I need to
declare
the*Target
properties I want to use. I'm fine with that but I'm wondering if that can done dynamically.declare
ing all of the properties isn't too bad when there's only 1 or 2targets
, but sometimes I have numeroustargets
and would like to avoiddeclare
ing every one of them when they're all very similar. It's a similar situation forvalues
andoutlets
but I use those far less thantargets
Is there a way to dynamically
declare
these properties or to tell TS thatController
does correctly implementControllerWithTarget<Targets>
below (while avoiding@ts-ignore
and similar) ?Any help is greatly appreciated, thanks!
The text was updated successfully, but these errors were encountered: