Skip to content

Commit

Permalink
fix(bindgen): And PolyData and friends to types requiring import
Browse files Browse the repository at this point in the history
Addresses:

```
src/mesh-to-poly-data-node-result.ts:3:19 - error TS2304: Cannot find name 'PolyData'.

3   outputPolydata: PolyData
```
  • Loading branch information
thewtex committed Feb 12, 2023
1 parent 196e0d7 commit 4dd76d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bindgen/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const interfaceJsonTypeToInterfaceType = new Map([
])

// Array of types that will require an import from itk-wasm
const typesRequireImport = ['Image']
const typesRequireImport = ['Image', 'Mesh', 'PolyData', 'TextFile', 'BinaryFile', 'TextFile', 'BinaryFile']

function camelCase(param) {
// make any alphabets that follows '-' an uppercase character, and remove the corresponding hyphen
Expand Down Expand Up @@ -216,6 +216,7 @@ function typescriptBindings(outputDir, buildDir, wasmBinaries, options, forNode=
let readmeResult = ''
let readmeOptions = ''

// -----------------------------------------------------------------
// Result module
let resultContent = `interface ${modulePascalCase}${nodeTextCamel}Result {\n`
const readmeResultTable = [ ['Property', 'Type', 'Description'], ]
Expand Down

0 comments on commit 4dd76d1

Please sign in to comment.