piumino
Version:
Piumino, meaning duvet in Italian, is like a duvet over the bed called Angular TestBed. It provides test helpers to test trivial things like inputs and outputs with a single line.
13 lines (12 loc) • 669 B
TypeScript
import { GenericFunction, GenericObject } from "../types";
export declare class ObjectHelper {
private static originalFunctions;
static getProperty(obj: GenericObject, path: string | string[]): unknown;
static setProperty(obj: GenericObject, path: string | string[], value: unknown): void;
static hasProperty(obj: GenericObject, path: string | string[]): boolean;
static replaceFunction(obj: GenericObject, func: string, implementation: GenericFunction): void;
static restoreFunction(obj: GenericObject, func: string): void;
static isObject(obj: unknown): boolean;
private static pathToKeys;
private static getOriginalFunctionKey;
}