@the-libs/auth-shared
Advanced tools
Comparing version 1.2.16 to 1.2.17
{ | ||
"name": "@the-libs/auth-shared", | ||
"version": "1.2.16", | ||
"version": "1.2.17", | ||
"dependencies": {}, | ||
@@ -5,0 +5,0 @@ "type": "module", |
import type { Document as MDocument, Types } from 'mongoose'; | ||
type OptionalIfFalse<IsRequired extends boolean, T> = IsRequired extends true ? T : T | undefined; | ||
type OptionalIfTrue<IsRequired extends boolean, T> = IsRequired extends false ? T | undefined : T; | ||
export interface User<NameRequired extends boolean = false, ProfilePictureUriRequired extends boolean = false, MultyAtAll extends boolean = false, USERTYPE = undefined> extends MDocument { | ||
export interface User<NameRequired extends boolean = false, MultyAtAll extends boolean = false, USERTYPE = undefined> extends MDocument { | ||
_id: Types.ObjectId; | ||
@@ -9,3 +9,3 @@ email: string; | ||
full_name: OptionalIfFalse<NameRequired, string>; | ||
profilePictureUri: OptionalIfFalse<ProfilePictureUriRequired, string>; | ||
profilePictureUri?: string; | ||
userType: OptionalIfTrue<MultyAtAll, USERTYPE>; | ||
@@ -12,0 +12,0 @@ createdAt: Date; |
Sorry, the diff of this file is not supported yet
2922