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:
parent
b9ee14fe5b
commit
a6fb6150a3
5 changed files with 25 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue