1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-06-14 08:39:17 +00:00

fix: Build issues

Signed-off-by: Avior <f.bouillon@aptatio.com>
This commit is contained in:
2022-12-09 14:57:08 +01:00
parent c5af3d17e6
commit 467f6e9e95
4 changed files with 9 additions and 9 deletions

View File

@ -1,8 +1,8 @@
import { objectLoop } from '@dzeio/object-util' import { objectLoop } from '@dzeio/object-util'
import { Card as SDKCard, CardResume, SupportedLanguages } from '@tcgdex/sdk' import { Card as SDKCard, CardResume, SupportedLanguages } from '@tcgdex/sdk'
import Set from './Set'
import { Pagination } from '../../interfaces' import { Pagination } from '../../interfaces'
import { lightCheck } from '../../util' import { lightCheck } from '../../util'
import Set from './Set'
type LocalCard = Omit<SDKCard, 'set'> & {set: () => Set} type LocalCard = Omit<SDKCard, 'set'> & {set: () => Set}
@ -51,7 +51,7 @@ export default class Card implements LocalCard {
if (key === 'set') { if (key === 'set') {
return return
} }
this[key as 'id'] = it this[key as 'id'] = it as string
}) })
} }

View File

@ -1,8 +1,8 @@
import { objectLoop } from '@dzeio/object-util' import { objectLoop } from '@dzeio/object-util'
import { Serie as SDKSerie, SerieResume, SupportedLanguages } from '@tcgdex/sdk' import { Serie as SDKSerie, SerieResume, SupportedLanguages } from '@tcgdex/sdk'
import Set from './Set'
import { Pagination } from '../../interfaces' import { Pagination } from '../../interfaces'
import { lightCheck } from '../../util' import { lightCheck } from '../../util'
import Set from './Set'
type LocalSerie = Omit<SDKSerie, 'sets'> & {sets: () => Array<Set>} type LocalSerie = Omit<SDKSerie, 'sets'> & {sets: () => Array<Set>}
@ -20,7 +20,7 @@ export default class Serie implements LocalSerie {
if (key === 'sets') { if (key === 'sets') {
return return
} }
this[key as 'id'] = it this[key as 'id'] = it as string
}) })
} }

View File

@ -1,9 +1,9 @@
import { objectLoop } from '@dzeio/object-util' import { objectLoop } from '@dzeio/object-util'
import { Set as SDKSet, SetResume, SupportedLanguages } from '@tcgdex/sdk' import { Set as SDKSet, SetResume, SupportedLanguages } from '@tcgdex/sdk'
import Card from './Card'
import { Pagination } from '../../interfaces' import { Pagination } from '../../interfaces'
import Serie from './Serie'
import { lightCheck } from '../../util' import { lightCheck } from '../../util'
import Card from './Card'
import Serie from './Serie'
interface variants { interface variants {
normal?: boolean; normal?: boolean;
@ -24,7 +24,7 @@ export default class Set implements LocalSet {
if (key === 'serie' || key === 'cards') { if (key === 'serie' || key === 'cards') {
return return
} }
this[key as 'id'] = it this[key as 'tcgOnline'] = it as string
}) })
} }

View File

@ -34,11 +34,11 @@ const totalStats = {
const setsData: Record<string, Record<string, Array<string>>> = {} const setsData: Record<string, Record<string, Array<string>>> = {}
function preProcessSets(t: any, lang: SupportedLanguages) { function preProcessSets(t: any, lang: SupportedLanguages) {
objectLoop(t.sets, (sets, serieId) => { objectLoop(t.sets, (sets, serieId: string) => {
if (!(serieId in setsData)) { if (!(serieId in setsData)) {
setsData[serieId] = {} setsData[serieId] = {}
} }
objectLoop(sets, (_, set) => { objectLoop(sets, (_, set: string) => {
if (!(set in setsData[serieId])) { if (!(set in setsData[serieId])) {
setsData[serieId][set] = [] setsData[serieId][set] = []
} }