Skip to content

Commit

Permalink
fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
arily committed Mar 13, 2024
1 parent fb5d780 commit cd61cec
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 20 deletions.
3 changes: 1 addition & 2 deletions src/components/app/nav/items.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup lang="ts">
import type { LocaleObject } from 'vue-i18n-routing'
import { useSession } from '~/store/session'
import { UserRole } from '~/def/user'
Expand Down Expand Up @@ -40,7 +39,7 @@ function clearFocus() {
<summary><icon name="tabler:world" class="w-5 h-5" />{{ localeProperties.name }}</summary>
<ul class="p-2 w-64">
<li
v-for="l in (locales as LocaleObject[])"
v-for="l in locales"
:key="l.code"
:class="{
disabled: l.code === locale,
Expand Down
8 changes: 4 additions & 4 deletions src/server/backend/$base/server/@extends.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { idToString, scoreIdToString, stringToId, stringToScoreId } from '$base'

export abstract class IdTransformable {
static idToString: typeof idToString
static stringToId: typeof stringToId
static readonly idToString: typeof idToString
static readonly stringToId: typeof stringToId
}

export abstract class ScoreIdTransformable {
static scoreIdToString: typeof scoreIdToString
static stringToScoreId: typeof stringToScoreId
static readonly scoreIdToString: typeof scoreIdToString
static readonly stringToScoreId: typeof stringToScoreId
}

export namespace Monitored {
Expand Down
4 changes: 2 additions & 2 deletions src/server/backend/bancho.py/server/clan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const keyofBanchoPyChanPriv = iBanchoPyClanPrivilege.map(i => i)

const drizzle = useDrizzle(schema)
export class ClanProvider extends Base<Id> {
static stringToId = stringToId
static idToString = idToString
static readonly stringToId = stringToId
static readonly idToString = idToString

config = config()

Expand Down
4 changes: 2 additions & 2 deletions src/server/backend/bancho.py/server/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import type { MapProvider as Base } from '$base/server'
const drizzle = useDrizzle(schema)

export class MapProvider implements Base<Id, Id> {
static idToString = idToString
static stringToId = stringToId
static readonly idToString = idToString
static readonly stringToId = stringToId

drizzle = drizzle

Expand Down
4 changes: 2 additions & 2 deletions src/server/backend/bancho.py/server/rank.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const leaderboardFields = {
} as const

export class DatabaseRankProvider implements Base<Id> {
static stringToId = stringToId
static idToString = idToString
static readonly stringToId = stringToId
static readonly idToString = idToString

/**
* @deprecated prisma will be replaced by drizzle
Expand Down
8 changes: 4 additions & 4 deletions src/server/backend/bancho.py/server/score.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import type {
const config = _config()
const drizzle = useDrizzle(schema)
export class ScoreProvider implements Base<bigint, Id> {
static idToString = idToString
static stringToId = stringToId
static readonly idToString = idToString
static readonly stringToId = stringToId

static stringToScoreId = stringToScoreId
static scoreIdToString = scoreIdToString
static readonly stringToScoreId = stringToScoreId
static readonly scoreIdToString = scoreIdToString

/**
* @deprecated prisma will be replaced by drizzle
Expand Down
4 changes: 2 additions & 2 deletions src/server/backend/bancho.py/server/user-relations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import type { UserCompact } from '~/def/user'
const config = _config()

export class UserRelationProvider implements Base<Id> {
static stringToId = stringToId
static idToString = idToString
static readonly stringToId = stringToId
static readonly idToString = idToString
/**
* @deprecated prisma will be replaced by drizzle
*/
Expand Down
4 changes: 2 additions & 2 deletions src/server/backend/bancho.py/server/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export const enum FilterType {
}

class DBUserProvider extends Base<Id, ScoreId> implements Base<Id, ScoreId> {
static stringToId = stringToId
static idToString = idToString
static readonly stringToId = stringToId
static readonly idToString = idToString
/**
* @deprecated prisma will be replaced by drizzle
*/
Expand Down

0 comments on commit cd61cec

Please sign in to comment.