typesを戻した

This commit is contained in:
tamaina 2021-11-22 19:21:58 +09:00
parent 4646b535fc
commit 3695197202
5 changed files with 4 additions and 4 deletions

View file

@ -5,7 +5,7 @@ declare var self: ServiceWorkerGlobalScope;
import { swLang } from '@/scripts/lang';
import { cli } from '@/scripts/operations';
import { pushNotificationDataMap } from '@/scripts/types';
import { pushNotificationDataMap } from '@/types';
import { getNoteSummary } from '@/scripts/get-note-summary';
import getUserName from '@/scripts/get-user-name';
import { I18n } from '@/scripts/i18n';

View file

@ -1,7 +1,7 @@
declare var self: ServiceWorkerGlobalScope;
import { get } from 'idb-keyval';
import { pushNotificationDataMap } from '@/scripts/types';
import { pushNotificationDataMap } from '@/types';
import { api } from '@/scripts/operations';
type Accounts = {

View file

@ -5,7 +5,7 @@
declare var self: ServiceWorkerGlobalScope;
import * as Misskey from 'misskey-js';
import { SwMessage, swMessageOrderType } from '@/scripts/types';
import { SwMessage, swMessageOrderType } from '@/types';
import { acct as getAcct } from '@/filters/user';
import { getAccountFromId } from '@/scripts/get-account-from-id';
import { getUrlWithLoginId } from '@/scripts/login-id';

View file

@ -1,31 +0,0 @@
import * as Misskey from 'misskey-js';
export type swMessageOrderType = 'post' | 'push';
export type SwMessage = {
type: 'order';
order: swMessageOrderType;
loginId: string;
url: string;
[x: string]: any;
};
// Defined also @/services/push-notification.ts#L7-L14
type pushNotificationDataSourceMap = {
notification: Misskey.entities.Notification;
unreadMessagingMessage: Misskey.entities.MessagingMessage;
readNotifications: { notificationIds: string[] };
readAllNotifications: undefined;
readAllMessagingMessages: undefined;
readAllMessagingMessagesOfARoom: { userId: string } | { groupId: string };
};
export type pushNotificationData<K extends keyof pushNotificationDataSourceMap> = {
type: K;
body: pushNotificationDataSourceMap[K];
userId: string;
};
export type pushNotificationDataMap = {
[K in keyof pushNotificationDataSourceMap]: pushNotificationData<K>;
};