MCPcopy
hub / github.com/rx-angular/rx-angular / get

Method get

libs/state/src/lib/rx-state.service.ts:253–284  ·  view source on GitHub ↗

@internal

(
    ...keys:
      | [KeyA]
      | [KeyA, KeyB]
      | [KeyA, KeyB, KeyC]
      | [KeyA, KeyB, KeyC, KeyD]
      | [KeyA, KeyB, KeyC, KeyD, KeyE]
      | [KeyA, KeyB, KeyC, KeyD, KeyE, KeyF]
  )

Source from the content-addressed store, hash-verified

251
252 /** @internal **/
253 get<
254 KeyA extends keyof State,
255 KeyB extends keyof State[KeyA],
256 KeyC extends keyof State[KeyA][KeyB],
257 KeyD extends keyof State[KeyA][KeyB][KeyC],
258 KeyE extends keyof State[KeyA][KeyB][KeyC][KeyD],
259 KeyF extends keyof State[KeyA][KeyB][KeyC][KeyD][KeyE],
260 >(
261 ...keys:
262 | [KeyA]
263 | [KeyA, KeyB]
264 | [KeyA, KeyB, KeyC]
265 | [KeyA, KeyB, KeyC, KeyD]
266 | [KeyA, KeyB, KeyC, KeyD, KeyE]
267 | [KeyA, KeyB, KeyC, KeyD, KeyE, KeyF]
268 ):
269 | State
270 | State[KeyA]
271 | State[KeyA][KeyB]
272 | State[KeyA][KeyB][KeyC]
273 | State[KeyA][KeyB][KeyC][KeyD]
274 | State[KeyA][KeyB][KeyC][KeyD][KeyE]
275 | State[KeyA][KeyB][KeyC][KeyD][KeyE][KeyF] {
276 const hasStateAnyKeys = Object.keys(this.accumulator.state).length > 0;
277 if (!!keys && keys.length) {
278 return safePluck(this.accumulator.state, keys);
279 } else {
280 return hasStateAnyKeys
281 ? this.accumulator.state
282 : (undefined as unknown as State);
283 }
284 }
285
286 /**
287 * @description

Callers 15

connectMethod · 0.95
parseMethod · 0.45
appFunction · 0.45
appFunction · 0.45
app.cy.tsFile · 0.45
getCharactersMethod · 0.45
getCharacterMethod · 0.45
getPokemonMethod · 0.45
directionMethod · 0.45
propertyMethod · 0.45
toggleSortByMethod · 0.45

Calls 1

safePluckFunction · 0.90

Tested by

no test coverage detected