MCPcopy
hub / github.com/redis/node-redis / _commandOptionsProxy

Method _commandOptionsProxy

packages/client/lib/client/index.ts:1077–1093  ·  view source on GitHub ↗
(
    key: K,
    value: V
  )

Source from the content-addressed store, hash-verified

1075 }
1076
1077 private _commandOptionsProxy<
1078 K extends keyof CommandOptions,
1079 V extends CommandOptions[K]
1080 >(
1081 key: K,
1082 value: V
1083 ) {
1084 const proxy = Object.create(this._self);
1085 proxy._commandOptions = { ...this._commandOptions, [key]: value };
1086 return proxy as RedisClientType<
1087 M,
1088 F,
1089 S,
1090 RESP,
1091 K extends 'typeMapping' ? V extends TypeMapping ? V : {} : TYPE_MAPPING
1092 >;
1093 }
1094
1095 /**
1096 * 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