fast
fast copied to clipboard
fix: Repeat Directive's Type Signature is incorrect
🐛 Bug Report
It appears the type signature for the repeat
directive is incorrect. Specifically, the acceptance of Expression<TSource, TArray, ExecutionContext<TSource>>
types. This type expression forces the context.parent
property of the expression binding to be of type ExecutionContext<TSource>
, which is inaccurate. See a repro below, along with the difference in type signatures between the when
directive and the repeat
directive.
It's also worth noting that in the when
directive, the context.parent
property is of type any
, which isn't accurate. @EisenbergEffect I recall you saying these types get messy quickly and getting everything to flow through properly was very tricky, any idea what is going on here? I'm noticing that CaptureType
doesn't accept a type param for TParent
, and that many directives don't capture that information - should they?
💻 Repro or Code Sample
https://stackblitz.com/edit/typescript-vcy276?file=index.ts