use-invariant
Version:
- <a target="_blank" rel="noopener noreferrer" href='https://codesandbox.io/s/usefetch-in-nextjs-nn9fm'>Example - Next.js</a> - <a target="_blank" rel="noopener noreferrer" href='https://codesandbox.io/embed/km04k9k9x5'>Examples - create-react-app</a>
12 lines (11 loc) • 494 B
TypeScript
export declare function useURLRequiredInvariant(condition: boolean, method: string): void;
export declare const useExampleURL: () => string;
/**
* Determines if the given param is an object. {}
* @param obj
*/
export declare const isObject: (obj: any) => boolean;
/**
* Used for error checking. If the condition is false, throw an error
*/
export declare function invariant(condition: boolean, format: string, a?: string, b?: string, c?: string, d?: string, e?: string, f?: string): void;