From 4dd76d19bed368bbf1575267bb3d2c83ff2e64ca Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Sun, 12 Feb 2023 17:08:49 -0500 Subject: [PATCH] fix(bindgen): And PolyData and friends to types requiring import Addresses: ``` src/mesh-to-poly-data-node-result.ts:3:19 - error TS2304: Cannot find name 'PolyData'. 3 outputPolydata: PolyData ``` --- src/bindgen/typescript.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bindgen/typescript.js b/src/bindgen/typescript.js index 8a1f88331..51886db01 100644 --- a/src/bindgen/typescript.js +++ b/src/bindgen/typescript.js @@ -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 @@ -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'], ]