refactor: fix types

This commit is contained in:
syuilo
2023-02-13 15:28:07 +09:00
parent a71682f6f0
commit f34f9f6ea5
19 changed files with 95 additions and 102 deletions

View File

@@ -217,6 +217,7 @@ export class User {
export interface ILocalUser extends User {
host: null;
uri: null;
}
export interface IRemoteUser extends User {
@@ -224,12 +225,6 @@ export interface IRemoteUser extends User {
uri: string;
}
export type CacheableLocalUser = ILocalUser;
export type CacheableRemoteUser = IRemoteUser;
export type CacheableUser = CacheableLocalUser | CacheableRemoteUser;
export const localUsernameSchema = { type: 'string', pattern: /^\w{1,20}$/.toString().slice(1, -1) } as const;
export const passwordSchema = { type: 'string', minLength: 1 } as const;
export const nameSchema = { type: 'string', minLength: 1, maxLength: 50 } as const;