mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-04 07:26:29 +09:00
chore: add tiny definition for redis-lock (#9971)
* add tiny definition for redis-lock * Update packages/backend/src/@types/redis-lock.d.ts Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> * fix type name * add @typescript-eslint/naming-convention * define taskToPerform type * chore: use default settings for `@typescript-eslint/naming-convention` * set `format:none` to typeParameter (default) * ignore lines to be treated as exceptions * chore: fix naming --------- Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
@ -9,7 +9,7 @@ import { MetaService } from '@/core/MetaService.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
|
||||
// Defined also packages/sw/types.ts#L13
|
||||
type pushNotificationsTypes = {
|
||||
type PushNotificationsTypes = {
|
||||
'notification': Packed<'Notification'>;
|
||||
'unreadAntennaNote': {
|
||||
antenna: { id: string, name: string };
|
||||
@ -56,7 +56,7 @@ export class PushNotificationService {
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async pushNotification<T extends keyof pushNotificationsTypes>(userId: string, type: T, body: pushNotificationsTypes[T]) {
|
||||
public async pushNotification<T extends keyof PushNotificationsTypes>(userId: string, type: T, body: PushNotificationsTypes[T]) {
|
||||
const meta = await this.metaService.fetch();
|
||||
|
||||
if (!meta.enableServiceWorker || meta.swPublicKey == null || meta.swPrivateKey == null) return;
|
||||
|
@ -1,8 +1,8 @@
|
||||
export type obj = { [x: string]: any };
|
||||
export type Obj = { [x: string]: any };
|
||||
export type ApObject = IObject | string | (IObject | string)[];
|
||||
|
||||
export interface IObject {
|
||||
'@context'?: string | string[] | obj | obj[];
|
||||
'@context'?: string | string[] | Obj | Obj[];
|
||||
type: string | string[];
|
||||
id?: string;
|
||||
name?: string | null;
|
||||
|
Reference in New Issue
Block a user