Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bind it somehow to event source type enum #14

Open
github-actions bot opened this issue Sep 8, 2023 · 0 comments
Open

bind it somehow to event source type enum #14

github-actions bot opened this issue Sep 8, 2023 · 0 comments
Labels

Comments

@github-actions
Copy link

github-actions bot commented Sep 8, 2023

https://api.github.com/vorant94/sofash/blob/fcb3ff714b19baf963f745027eebdd11e63af32c/libs/mq/src/raw-event/raw-event.job.ts#L17

import { type message } from 'tdlib-types';
import { type BaseJob } from '../shared/base.job.js';
import { type EventSourceEntity } from 'db';

export type RawEventJob = TelegramRawEventJob | MeetupRawEventJob;

export interface TelegramRawEventJob extends BaseJob {
  eventSource: EventSourceEntity<'telegram'>;
  content: EventSourceTypeToRawEventContent['telegram'];
}

export interface MeetupRawEventJob extends BaseJob {
  eventSource: EventSourceEntity<'meetup'>;
  content: EventSourceTypeToRawEventContent['meetup'];
}

// TODO bind it somehow to event source type enum
interface EventSourceTypeToRawEventContent {
  telegram: message;
  meetup: unknown;
}
@github-actions github-actions bot added the todo label Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

0 participants