Replace num_detected with {DetectedEvent}#22
Conversation
num_detected with {DetectedEvent}
num_detected with {DetectedEvent}num_detected with {DetectedEvent}
| local name: string = ll.DetectedName(i) | ||
| local key: string = ll.DetectedKey(i) | ||
| LLEvents:on("touch_start", function(events: {DetectedEvent}) | ||
| for i: number, event: DetectedEvent in events do |
There was a problem hiding this comment.
for number, event: DetectedEvent in events do
There was a problem hiding this comment.
either one works, but annotating both variables is more consistent with the rest of the code examples on this page; most of them have type annotations.
The annotations don't really help in this specific example though. I shortened it: b37870e
There was a problem hiding this comment.
Yes, not all my review comments are useful (particularly in the early morning). Don't be shy about pushing back. No need to verify the internal operations of '... in <table> do' here but if you want to for consistency, go ahead.
There was a problem hiding this comment.
I'm happy either way. It's also not a terrible idea to show examples of both with and without annotations on this page, since it's one of the first pages new lua scripters will see (it was for me)
No description provided.