diff --git a/Dashboard/src/Components/Slack/SlackIntegration.tsx b/Dashboard/src/Components/Slack/SlackIntegration.tsx index 12e8884230..7239803d7e 100644 --- a/Dashboard/src/Components/Slack/SlackIntegration.tsx +++ b/Dashboard/src/Components/Slack/SlackIntegration.tsx @@ -183,10 +183,16 @@ const SlackIntegration: FunctionComponent = ( return ; } - const connectWithSlack = (data: { + interface ConnectWithSlackData { mode: "workspace" | "user"; expectedWorkspaceProjectId?: string; - }): void => { + } + + type ConnectWithSlack = (data: ConnectWithSlackData) => void; + + const connectWithSlack: ConnectWithSlack = ( + data: ConnectWithSlackData, + ): void => { if (!SlackAppClientId) { setError(
diff --git a/Dashboard/src/Components/Workspace/WorkspaceNotificationRulesTable.tsx b/Dashboard/src/Components/Workspace/WorkspaceNotificationRulesTable.tsx index 71afe9350c..875d791e43 100644 --- a/Dashboard/src/Components/Workspace/WorkspaceNotificationRulesTable.tsx +++ b/Dashboard/src/Components/Workspace/WorkspaceNotificationRulesTable.tsx @@ -419,7 +419,11 @@ const WorkspaceNotificationRuleTable: FunctionComponent = ( return ; } - const getWorkspaceDisplayName = ( + type GetWorkspaceDisplayName = ( + workspace: WorkspaceProjectAuthToken, + ) => string; + + const getWorkspaceDisplayName: GetWorkspaceDisplayName = ( workspace: WorkspaceProjectAuthToken, ): string => { if (props.workspaceType === WorkspaceType.Slack) { @@ -458,7 +462,9 @@ const WorkspaceNotificationRuleTable: FunctionComponent = ( ? workspaceProjectAuthTokens[0]?.id?.toString() : undefined; - const getWorkspaceNameById = (id?: string): string => { + type GetWorkspaceNameById = (id?: string) => string; + + const getWorkspaceNameById: GetWorkspaceNameById = (id?: string): string => { if (!id) { return "-"; }