projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '15020-collection-with-the-same-content-adress'
[arvados-workbench2.git]
/
src
/
store
/
resources
/
resources.ts
diff --git
a/src/store/resources/resources.ts
b/src/store/resources/resources.ts
index 4fec02a5d5b9af8ed3b179dcb6f0aad727143093..e7153decd70af11a91131c8f8009a26a74df73eb 100644
(file)
--- a/
src/store/resources/resources.ts
+++ b/
src/store/resources/resources.ts
@@
-2,16
+2,16
@@
//
// SPDX-License-Identifier: AGPL-3.0
//
// SPDX-License-Identifier: AGPL-3.0
-import { Resource
Types
} from "~/models/resource";
+import { Resource } from "~/models/resource";
import { ResourceKind } from '~/models/resource';
import { ResourceKind } from '~/models/resource';
-export type ResourcesState = { [key: string]: Resource
Types
};
+export type ResourcesState = { [key: string]: Resource };
-export const getResource = <T extends Resource
Types = ResourceTypes
>(id: string) =>
+export const getResource = <T extends Resource
= Resource
>(id: string) =>
(state: ResourcesState): T | undefined =>
state[id] as T;
(state: ResourcesState): T | undefined =>
state[id] as T;
-export const setResource = <T extends Resource
Types
>(id: string, data: T) =>
+export const setResource = <T extends Resource>(id: string, data: T) =>
(state: ResourcesState) => ({
...state,
[id]: data
(state: ResourcesState) => ({
...state,
[id]: data
@@
-24,7
+24,7
@@
export const deleteResource = (id: string) =>
return newState;
};
return newState;
};
-export const filterResources = (filter: (resource: Resource
Types
) => boolean) =>
+export const filterResources = (filter: (resource: Resource) => boolean) =>
(state: ResourcesState) =>
Object
.keys(state)
(state: ResourcesState) =>
Object
.keys(state)