sv443-joke-api
Version:
JavaScript wrapper for Sv443's Joke API
37 lines (36 loc) • 994 B
TypeScript
export declare enum ErrorMessages {
INVALID_OPTION_VALUE = 0,
UNDEFINED_REQUIRED_VALUE = 1,
UNKNOWN_OPTION = 2
}
export declare const VALUES: {
API_BASE: string;
_AVAILABLE_FLAGS: string[];
_AVAILABLE_CATEGORIES: string[];
};
/**
* Wrapper for console.log with optional logging
* @private
*/
export declare const log: (...message: any[]) => void;
interface SettingsType {
/**
* To turn on "safe mode" on JokeAPI (introduced in v2.3.0)
* @default false
*/
safeMode: boolean;
/**
* If set true, the responses will be processed by the package itself.
* This means, every request to the API will return a new Promise, resolves to the actual data you requested, or an error.
* @default false
* @important Works with json data type only
*/
handleResponsesInternally: boolean;
/**
* Toggle logging.
* @default false
*/
logging: boolean;
}
export declare const SETTINGS: SettingsType;
export {};