Question about leaderboard method signature of js runtime

is there any reason the type of metadata parameter are different for leaderboardCreate and tournamentCreate

metadata?: {[key: string]: any},
metadata?: {[key: string]: any} | null,
 leaderboardCreate(
            leaderboardID: string,
            authoritative: boolean,
            sortOrder?: SortOrder,
            operator?: Operator,
            resetSchedule?: null | string,
            metadata?: {[key: string]: any},
        ): void;
        tournamentCreate(
            tournamentID: string,
            authoritative: boolean,
            sortOrder: SortOrder,
            operator: Operator,
            duration?: number,
            resetSchedule?: string | null,
            metadata?: {[key: string]: any} | null,
            title?: string | null,
            description?: string | null,
            category?: number | null,
            startTime?: number | null,
            endTime?: number | null,
            maxSize?: number | null,
            maxNumScore?: number | null,
            joinRequired?: boolean,
        ): void;

An oversight in the TS definitions, a fix is incoming Allow metadata to be null in TS leaderboardCreate by sesposito · Pull Request #151 · heroiclabs/nakama-common · GitHub, thank you for reporting.

1 Like

thanks for confirmation