Strongly type everything

This commit is contained in:
Taevas 2023-05-10 19:55:11 +02:00
parent 842a627cac
commit fee3766c2b
18 changed files with 221 additions and 109 deletions

View file

@ -1,5 +1,6 @@
import { Handler } from '@netlify/functions'
import { API, APIError, User } from 'osu-api-v2-js'
import { OsuInfo } from '../../src/components/Osu'
const handler: Handler = async (event, context) => {
let api = await API.createAsync({id: 11451, secret: process.env.API_OSU!})
@ -24,7 +25,7 @@ const handler: Handler = async (event, context) => {
}
}
let ranks = {
let ranks: OsuInfo = {
osu: [0,0],
taiko: [0,0],
fruits: [0,0],