@sapphire/utilities
Version:
Common JavaScript utilities for the Sapphire Community
12 lines (9 loc) • 529 B
text/typescript
import { Constructor } from './types.mjs';
/**
* Verify if the input is an object literal (or class).
* @param input The object to verify
* @param constructorType The type of the constructor of the object. Use this if you want a `class` of your choosing to pass the check as well.
*/
declare function isObject(input: unknown, constructorType?: ObjectConstructor): input is object;
declare function isObject<T extends Constructor<unknown>>(input: unknown, constructorType: T): input is InstanceType<T>;
export { isObject };