diff --git a/src/bindgen/typescript.js b/src/bindgen/typescript.js index ca718c74f..594905884 100644 --- a/src/bindgen/typescript.js +++ b/src/bindgen/typescript.js @@ -447,11 +447,16 @@ function typescriptBindings(outputDir, buildDir, wasmBinaries, options, forNode= functionContent += ` const inputFile = 'file' + inputs.length.toString()\n` functionContent += ` inputs.push({ type: InterfaceTypes.${interfaceType}, data: { data: options.${camel}, path: inputFile } })\n` functionContent += ` args.push('--${parameter.name}', inputFile)\n` - } else { + } else if (interfaceType.includes('Stream')) { // for streams functionContent += ` const inputCountString = inputs.length.toString()\n` functionContent += ` inputs.push({ type: InterfaceTypes.${interfaceType}, data: { data: options.${camel} } })\n` functionContent += ` args.push('--${parameter.name}', inputCountString)\n` + } else { + // Image, Mesh, PolyData, JsonObject + functionContent += ` const inputCountString = inputs.length.toString()\n` + functionContent += ` inputs.push({ type: InterfaceTypes.${interfaceType}, data: options.${camel} })\n` + functionContent += ` args.push('--${parameter.name}', inputCountString)\n` } } else { functionContent += ` args.push('--${parameter.name}', options.${camel}.toString())\n`