UNPKG

osrs-tools

Version:

A comprehensive TypeScript library for Old School RuneScape (OSRS) data and utilities, including quest data, skill requirements, and game item information

53 lines 1.91 kB
import { Skill } from "../model/account/Skill"; /** * Validates a skill level value * @param level The level to validate * @param skillName Name of the skill (for error context) * @throws {ValidationError} If level is invalid */ export declare function validateSkillLevel(level: number, skillName: string): void; /** * Validates quest points value * @param points The quest points to validate * @throws {ValidationError} If points value is invalid */ export declare function validateQuestPoints(points: number): void; /** * Validates combat level value * @param level The combat level to validate * @throws {ValidationError} If level is invalid */ export declare function validateCombatLevel(level: number): void; /** * Validates a skill name * @param name The skill name to validate * @throws {ValidationError} If name is invalid */ export declare function validateSkillName(name: string): void; /** * Type guard for checking if a value is a valid skill name * @param name The value to check * @returns True if value is a valid skill name */ export declare function isValidSkillName(name: string): name is keyof typeof Skill; /** * Validates experience (XP) value * @param xp The XP value to validate * @param skillName Name of the skill (for error context) * @throws {ValidationError} If XP value is invalid */ export declare function validateExperience(xp: number, skillName: string): void; /** * Validates rank value * @param rank The rank value to validate * @param context Additional context for error message * @throws {ValidationError} If rank value is invalid */ export declare function validateRank(rank: number, context: string): void; /** * Validates an account name * @param name The account name to validate * @throws {ValidationError} If name is invalid */ export declare function validateAccountName(name: string): void; //# sourceMappingURL=validation.d.ts.map