Variable noopConst

noop: any = ...

Description

Universal noop proxy — any property access, method call, new construct, or function application returns the noop itself. Never throws, never rejects.

Use as a drop-in mock for any dependency: noop.db.query('SELECT 1'), noop.config.get('key'), await noop.asyncMethod(), for (const x of noop.items) {}, JSON.stringify(noop).

Important: typeof noop returns 'function' because the Proxy target is a function. This is a JavaScript limitation (typeof is not interceptable by Proxy).

Example

import { noop } from '@biorate/unimock';

const service = new Service(noop); // noop as any dependency
service.run(); // noop methods called internally — no crash