Started playing around with typescript generic types

This commit is contained in:
Eclypsed
2024-02-19 15:03:39 -05:00
parent 00fd41ae69
commit 46e55f10c5
7 changed files with 21 additions and 69 deletions

5
src/app.d.ts vendored
View File

@@ -4,7 +4,7 @@ declare global {
namespace App {
// interface Error {}
interface Locals {
user: User
user: Omit<User, 'password'>
}
// interface PageData {}
// interface PageState {}
@@ -21,7 +21,7 @@ declare global {
interface User {
id: string
username: string
password?: string
password: string
}
type serviceType = 'jellyfin' | 'youtube-music'
@@ -39,6 +39,7 @@ declare global {
accessToken: string
refreshToken?: string
expiry?: number
connectionInfo?: ConnectionInfo
}
interface ConnectionInfo {