synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
21 lines (20 loc) • 732 B
JavaScript
function t(r) {
const e = r.taskProperties;
if (e == null)
throw new Error("CurationTask is missing taskProperties");
switch (e.concreteType) {
case "org.sagebionetworks.repo.model.curation.metadata.FileBasedMetadataTaskProperties":
return e.fileViewId;
case "org.sagebionetworks.repo.model.curation.metadata.RecordBasedMetadataTaskProperties":
return e.recordSetId;
default:
throw new Error(
// @ts-expect-error - This will fail if a new concreteType is introduced until it is handled in the switch statement.
`Unknown taskProperties concreteType: ${e.concreteType}`
);
}
}
export {
t as getGridSourceIdForTask
};
//# sourceMappingURL=getGridSourceIdForTask.js.map