osu-api-extended
Version:
Advanced osu! api wrapper for v1 and v2, with extra stuff
14 lines (13 loc) • 621 B
TypeScript
import { IDefaultParams, IError } from "../../types";
import { BeamapsDetailsDifficulty } from "../../types/v2/beamaps_details_difficulty";
import { BeamapsDetailsSet } from "../../types/v2/beamaps_details_set";
type params = ({
type: 'difficulty';
id: number;
} | {
type: 'set';
id: number;
});
type Response<T extends params['type']> = T extends 'difficulty' ? BeamapsDetailsDifficulty & IError : T extends 'set' ? BeamapsDetailsSet & IError : IError;
export declare const beatmaps_details: <T extends params>(params: T, addons?: IDefaultParams) => Promise<Response<T["type"]>>;
export {};