Mejor type

This commit is contained in:
Nulo 2021-07-07 18:34:08 +00:00
parent a3c1f77d87
commit 39d4c1525d

View file

@ -134,7 +134,7 @@ function socialButtons(juego: Juego<State>): {
let x = juego.canvas.width - 5; let x = juego.canvas.width - 5;
let s: any = {}; let s: any = {};
for (const network of ["facebook", "instagram", "twitter"]) { for (const network of ["facebook", "instagram", "twitter"]) {
const sprite = (juego.sprites as any)[network]; const sprite = (juego.sprites as { [key in string]: Sprite })[network];
const width = sprite.getWidth(juego); const width = sprite.getWidth(juego);
const height = sprite.getHeight(juego); const height = sprite.getHeight(juego);
x -= width + 20; x -= width + 20;