X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/28e674396a7933312d4af62b3ca6552d3e0855e8..54e859c204c3952a8eaf96d2145dfa96c199b934:/src/models/workflow.ts diff --git a/src/models/workflow.ts b/src/models/workflow.ts index d7d97c4c96..5991513742 100644 --- a/src/models/workflow.ts +++ b/src/models/workflow.ts @@ -141,6 +141,12 @@ export const isPrimitiveOfType = (input: GenericCommandInputParameter, ? input.type.indexOf(type) > -1 : input.type === type; +export const isArrayOfType = (input: GenericCommandInputParameter, type: CWLType) => + typeof input.type === 'object' && + input.type.type === 'array' + ? input.type.items === type + : false; + export const stringifyInputType = ({ type }: CommandInputParameter) => { if (typeof type === 'string') { return type;