Skip to content

Commit

Permalink
TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
Filip Maj committed Sep 14, 2024
1 parent 5ae0120 commit c469c9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ export default class App<AppCustomContext extends StringIndexed = StringIndexed>
// TODO: this value should eventually conform to AnyMiddlewareArgs
let payload: DialogSubmitAction | WorkflowStepEdit | SlackShortcut | KnownEventFromType<string> | SlashCommand
| KnownOptionsPayloadFromType<string> | BlockElementAction | ViewOutput | InteractiveAction;
// TODO: can we instead use type predicates in these switch cases to allow for narrowing of the body simultaneously? dont we have isEvent, isView, isShortcut, isAction already in types/utilities or helpers?
// TODO: can we instead use type predicates in these switch cases to allow for narrowing of the body simultaneously? we have isEvent, isView, isShortcut, isAction already in types/utilities / helpers
switch (type) {
case IncomingEventType.Event:
payload = (bodyArg as SlackEventMiddlewareArgs['body']).event;
Expand Down Expand Up @@ -1045,6 +1045,7 @@ export default class App<AppCustomContext extends StringIndexed = StringIndexed>
payload,
};

// TODO: can we instead use type predicates in these switch cases to allow for narrowing of the body simultaneously? we have isEvent, isView, isShortcut, isAction already in types/utilities / helpers
// Set aliases
if (type === IncomingEventType.Event) {
const eventListenerArgs = listenerArgs as SlackEventMiddlewareArgs;
Expand Down

0 comments on commit c469c9c

Please sign in to comment.