MCPcopy Index your code
hub / github.com/redis/node-redis / _commandOptionsProxy

Method _commandOptionsProxy

packages/client/lib/client/pool.ts:368–384  ·  view source on GitHub ↗
(
    key: K,
    value: V
  )

Source from the content-addressed store, hash-verified

366 // accessible through the prototype chain, which would force the helper to
367 // be called via `this._self`, discarding any prior proxy overrides.
368 private _commandOptionsProxy<
369 K extends keyof CommandOptions,
370 V extends CommandOptions[K]
371 >(
372 key: K,
373 value: V
374 ) {
375 const proxy = Object.create(this._self);
376 proxy._commandOptions = { ...this._commandOptions, [key]: value };
377 return proxy as RedisClientPoolType<
378 M,
379 F,
380 S,
381 RESP,
382 K extends 'typeMapping' ? V extends TypeMapping ? V : {} : TYPE_MAPPING
383 >;
384 }
385
386 /**
387 * Override the `typeMapping` command option

Callers 3

withTypeMappingMethod · 0.95
withAbortSignalMethod · 0.95
asapMethod · 0.95

Calls 1

createMethod · 0.45

Tested by

no test coverage detected