UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

21 lines (20 loc) 732 B
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