Skip to content

Commit

Permalink
fix(bindgen): Specify Image, Mesh, PolyData, JsonObject
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Mar 1, 2023
1 parent c7cefb2 commit ce7aa7e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bindgen/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit ce7aa7e

Please sign in to comment.