Improving type safety

This commit is contained in:
aronmal 2023-04-11 20:07:27 +02:00
parent 37e4f35e33
commit 8cf563ed92
Signed by: aronmal
GPG key ID: 816B7707426FC612
12 changed files with 26 additions and 23 deletions

View file

@ -4,8 +4,8 @@ import type { IdToken, RawToken } from "./createTokenDB"
import sendError, { API } from "./sendError"
import jwt from "jsonwebtoken"
async function checkTokenIsValid(
context: API,
async function checkTokenIsValid<T>(
context: API<T>,
rawToken: RawToken,
next: (token: IdToken) => void
) {