- Issue created by @marcin maruszewski
- Status changed to Closed: duplicate
almost 2 years ago 1:44pm 24 March 2023 Hi @Marcin → . We are aware that the types returned from DrupalState could be refined. In the meantime, you can use Type Assertions to tell the TypeScript compiler which type you are expecting this data to be.
For example:
const recipesFromApi = (await store.getObject({ objectName: "node--recipe", })) as { id: string; title: string }[];
I am closing this as a duplicate of #3321306 → . Feel free to discuss any proposed ideas there.