UNPKG

1.07 kBTypeScriptView Raw
1export declare class InvariantError extends Error {
2 framesToPop: number;
3 name: string;
4 constructor(message?: string | number);
5}
6export declare function invariant(condition: any, message?: string | number): asserts condition;
7declare const verbosityLevels: readonly ["debug", "log", "warn", "error", "silent"];
8export declare type VerbosityLevel = (typeof verbosityLevels)[number];
9export declare type ConsoleMethodName = Exclude<VerbosityLevel, "silent">;
10export declare namespace invariant {
11 const debug: {
12 (...data: any[]): void;
13 (message?: any, ...optionalParams: any[]): void;
14 };
15 const log: {
16 (...data: any[]): void;
17 (message?: any, ...optionalParams: any[]): void;
18 };
19 const warn: {
20 (...data: any[]): void;
21 (message?: any, ...optionalParams: any[]): void;
22 };
23 const error: {
24 (...data: any[]): void;
25 (message?: any, ...optionalParams: any[]): void;
26 };
27}
28export declare function setVerbosity(level: VerbosityLevel): VerbosityLevel;
29export default invariant;