diff --git a/src/JSONWebToken.ts b/src/JSONWebToken.ts index f088049..401ee6f 100644 --- a/src/JSONWebToken.ts +++ b/src/JSONWebToken.ts @@ -3,7 +3,9 @@ import type * as JWT from "jsonwebtoken" import { ImportError } from "./ImportError" -export class JSONWebToken extends Context.Tag("JSONWebToken")() {} + +export interface JSONWebTokenService { sign: ( payload: string | object | Buffer, secretOrPrivateKey: JWT.Secret, @@ -12,7 +14,7 @@ export class JSONWebToken extends Context.Tag("JSONWebToken"), + > verify: ( token: string, @@ -22,8 +24,8 @@ export class JSONWebToken extends Context.Tag("JSONWebToken"), -}>() {} + > +} const importJWT = Effect.tryPromise({