0.1.17 #18

Merged
Thilawyn merged 37 commits from next into master 2024-09-07 20:56:30 +02:00
Showing only changes of commit 6e5c371b40 - Show all commits

View File

@@ -3,7 +3,9 @@ import type * as JWT from "jsonwebtoken"
import { ImportError } from "./ImportError"
export class JSONWebToken extends Context.Tag("JSONWebToken")<JSONWebToken, {
export class JSONWebToken extends Context.Tag("JSONWebToken")<JSONWebToken, JSONWebTokenService>() {}
export interface JSONWebTokenService {
sign: (
payload: string | object | Buffer,
secretOrPrivateKey: JWT.Secret,
@@ -12,7 +14,7 @@ export class JSONWebToken extends Context.Tag("JSONWebToken")<JSONWebToken, {
string,
Error,
never
>,
>
verify: (
token: string,
@@ -22,8 +24,8 @@ export class JSONWebToken extends Context.Tag("JSONWebToken")<JSONWebToken, {
string | JWT.Jwt | JWT.JwtPayload,
JWT.VerifyErrors | Error,
never
>,
}>() {}
>
}
const importJWT = Effect.tryPromise({