Minor refactors

This commit is contained in:
2025-03-28 22:06:09 +01:00
parent 0c903e1087
commit 709165bab0
10 changed files with 20 additions and 54 deletions

View File

@@ -1,5 +1,5 @@
import * as Common from "common";
import * as Function from "common/Function";
import { unsafeCoerce } from "effect";
import { t } from "elysia";
export interface AccessTokenPayload {
@@ -24,8 +24,8 @@ export interface IdTokenPayload {
}
const brandedString = <T>() => t.Transform(t.String())
.Decode(Function.unsafeCoerce<string, T>)
.Encode(Function.unsafeCoerce<T, string>);
.Decode(unsafeCoerce<string, T>)
.Encode(unsafeCoerce<T, string>);
export const Sha256_Hex = brandedString<Common.Sha256_Hex>();
export const AttachmentId = brandedString<Common.AttachmentId>();