UNPKG

@serenity-js/core

Version:

The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure

56 lines 1.75 kB
export declare class ValueInspector { static isPromise(value: unknown): value is Promise<unknown>; static isDate(value: unknown): value is Date; /** * Checks if the value is a named [`Function`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) * * @param value */ static isFunction(value: unknown): value is Function; /** * Checks if the value has a good chance of being a plain JavaScript object * * @param value */ static isPlainObject(value: unknown): value is object; /** * Returns true if `value` is a [JavaScript primitive](https://developer.mozilla.org/en-US/docs/Glossary/Primitive), * false otherwise. * * @param value */ static isPrimitive(value: unknown): boolean; /** * Checks if the value defines its own `toString` method * * @param value */ static hasItsOwnToString(value: unknown): boolean; /** * Describes the type of the provided value. * * @param value */ static typeOf(value: unknown): string; /** * Inspired by https://davidwalsh.name/detect-native-function * * @param value */ static isNative(value: unknown): value is Function; /** * Checks if the value defines its own `inspect` method * * @param value */ static isInspectable(value: unknown): value is { inspect: () => string; }; /** * Checks if the value defines its own [`inspect` method](https://nodejs.org/api/util.html#util_util_inspect_custom) * * @param value */ static hasCustomInspectionFunction(value: unknown): value is object; } //# sourceMappingURL=ValueInspector.d.ts.map