title: Uncaught TypeError: Cannot read property 'release' of undefined
body: <p><strong>Hi guys !</strong>  </p>
  
  <p>I need some help.
  I would like test my tree of services with a particular structure.</p>
  
  <p>My test looks like :</p>
  
  <pre><code>describe(`Service selector`, () =&gt; {
    describe(`getCurrentServiceTree`, () =&gt; {
      it(`should build the generic service tree`, () =&gt; {
        const services = [
          '{http://namespace-example.fr/service/technique/version/1.0}Localpart0',
          '{http://namespace-example.fr/service/technique/version/1.0}Localpart1',
          '{http://namespace-example.fr/service/technique/version/2.0}Localpart2',
          '{http://namespace-example.fr/service/technique/version/3.0}Localpart3',
          '{http://namespace-example.fr/service/technique/version/3.0}Localpart4',
        ];
  
        const expectedTree: TreeElement&lt;any&gt;[] = [
          {
            name: 'http://namespace-example.fr/service/technique/version/1.0',
            children: [
              {
                name: 'Localpart0',
                children: [],
                isFolded: false,
                cssClass: 'item-localpart',
              },
              {
                name: 'Localpart1',
                children: [],
                isFolded: false,
                cssClass: 'item-localpart',
              },
            ],
            isFolded: false,
            cssClass: 'item-namespace',
          },
          {
            name: 'http://namespace-example.fr/service/technique/version/2.0',
            children: [
              {
                name: 'Localpart2',
                children: [],
                isFolded: false,
                cssClass: 'item-localpart',
              },
            ],
            isFolded: false,
            cssClass: 'item-namespace',
          },
          {
            name: 'http://namespace-example.fr/service/technique/version/3.0',
            children: [
              {
                name: 'Localpart3',
                children: [],
                isFolded: false,
                cssClass: 'item-localpart',
              },
              {
                name: 'Localpart4',
                children: [],
                isFolded: false,
                cssClass: 'item-localpart',
              },
            ],
            isFolded: false,
            cssClass: 'item-namespace',
          },
        ];
  
        const generatedStore: Partial&lt;IStore&gt; = {
          services: {
            byId: services.reduce(
              (acc, name, index) =&gt; ({ ...acc, [`service${index}`]: { name } }),
              {}
            ),
            allIds: services.map((_, index) =&gt; `service${index}`),
            isFetchingServices: false,
            selectedServiceId: '',
          },
        };
  
        expect(getCurrentServiceTree(generatedStore as any)).toEqual(
          expectedTree
        );
      });
    });
  });
  </code></pre>
  
  <p>I don't know if it's a TypeScript issue or if is related to RxJS.. or just my code :(</p>
  
  <p>When I put my mouse to getCurrentServiceTree, I have that :  </p>
  
  <blockquote>
    <p>(alias) getCurrentServiceTree(state: IStore): TreeElement[]
    import getCurrentServiceTree</p>
  </blockquote>
  
  <p>I don't know if I use correctly <code>Partial&lt;T&gt;</code>.<br>
  I can't type generatedStore as  ..<br>
  When I put my mouse to , I have that : </p>
  
  <blockquote>
    <p>[ts] L'argument de type '() => any' n'est pas attribuable au
    paramètre de type 'IStore'.   La propriété 'ui' est manquante dans le
    type '() => any'.</p>
  </blockquote>
  
  <pre><code>export const getCurrentServiceTree = createSelector(
    getSelectedWorkspaceId,
    getServicesAllIds,
    getServicesById,
    (selectedWorkspaceId, servicesAllIds, servicesByIds): TreeElement&lt;any&gt;[] =&gt; {
      const baseUrl = `/workspaces/${selectedWorkspaceId}/services`;
  
      const servicesWithNspLocalpart = servicesAllIds.map(id =&gt; ({
        ...findNamespaceLocalpart(servicesByIds[id].name),
        id,
      }));
  
      const groupedByNamespace = groupByNamespace(servicesWithNspLocalpart);
  
      return groupedByNamespace.map(nspWithLocalparts =&gt; ({
        name: nspWithLocalparts.namespace,
        isFolded: false,
        cssClass: `item-namespace`,
        link: ``,
        children: nspWithLocalparts.localparts.map(localpart =&gt; ({
          name: localpart.name,
          isFolded: false,
          cssClass: `item-localpart`,
          link: `${baseUrl}/${localpart.id}`,
          children: [],
        })),
      }));
    }
  );
  </code></pre>
  
  <p>What I'm suppose to do ?<br>
  Can someone explain me how can I resolve my problem please ?</p>