refactor(sw): Fix type errors in packages/sw (#9909)

* Fix type errors in packages/sw

* mouhitotsu

* @typesは越境しない

* Update packages/sw/src/scripts/create-notification.ts

---------

Co-authored-by: tamaina <tamaina@hotmail.co.jp>
This commit is contained in:
Kagami Sascha Rosylight 2023-02-12 16:31:37 +01:00 committed by GitHub
parent a71682f6f0
commit 9f0e0dc8ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 41 additions and 30 deletions

View file

@ -28,7 +28,7 @@ class SwNotificationReadManager {
}
// プッシュ通知の既読をサーバーに送信
public async read<K extends keyof pushNotificationDataMap>(data: pushNotificationDataMap[K]) {
public async read(data: pushNotificationDataMap[keyof pushNotificationDataMap]) {
if (data.type !== 'notification' || !(data.userId in this.accounts)) return;
const account = this.accounts[data.userId];