Skip to content

Commit

Permalink
improve typing
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki-takei committed Sep 7, 2024
1 parent cb64148 commit bca24c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions apps/slackbot-proxy/src/services/LinkSharedService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { WebClient } from '@slack/web-api';
import { Inject, Service } from '@tsed/di';
import axios from 'axios';

import { RelationRepository } from '~/repositories/relation';
import type { RelationRepository } from '~/repositories/relation';
import loggerFactory from '~/utils/logger';

const logger = loggerFactory('slackbot-proxy:services:LinkSharedService');
Expand Down Expand Up @@ -42,7 +42,7 @@ type PublicData = {
export type DataForLinkShared = PrivateData | PublicData;

@Service()
export class LinkSharedService implements GrowiEventProcessor {
export class LinkSharedService implements GrowiEventProcessor<LinkSharedRequestEvent> {

@Inject()
relationRepository: RelationRepository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { PhrasingContent } from 'mdast';
import type { Parent } from 'unist';

import { DirectiveType } from './consts.js';
import type { DirectiveType } from './consts.js';


type DirectiveAttributes = Record<string, string>
Expand Down
4 changes: 2 additions & 2 deletions packages/slack/src/interfaces/growi-event-processor.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { WebClient } from '@slack/web-api';

export interface GrowiEventProcessor {
export interface GrowiEventProcessor<EVENT> {
shouldHandleEvent(eventType: string): boolean;

processEvent(client: WebClient, event: any): Promise<void>;
processEvent(client: WebClient, event: EVENT): Promise<void>;
}

0 comments on commit bca24c5

Please sign in to comment.