Minor refactors
This commit is contained in:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user