You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
declareing all of the properties isn't too bad when there's only 1 or 2 targets, but sometimes I have numerous targets and would like to avoid declareing every one of them when they're all very similar. It's a similar situation for values and outlets but I use those far less than targets
Is there a way to dynamically declare these properties or to tell TS that Controller does correctly implement ControllerWithTarget<Targets> below (while avoiding @ts-ignore and similar) ?
Hey @mlwyatt, I know this might not be exactly what you are looking for, but I find the pattern proposed in the stimulus-decorators package kinda elegant.
Hey @mlwyatt, I know this might not be exactly what you are looking for, but I find the pattern proposed in the stimulus-decorators package kinda elegant.
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
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: