Open
Description
Generating and using a module works within the example app seems to work fine because the snippets in Step 5 import TypeScript directly.
However, this approach presents problems when trying to make use of the Rust module in a separate app (i.e. installing the module with npm i ../<PATH_TO_RUST_MODULE>
).
Found 54 errors in 10 files.
Errors Files
2 node_modules/uniffi-bindgen-react-native/typescript/src/async-callbacks.ts:25
1 node_modules/uniffi-bindgen-react-native/typescript/src/async-rust-call.ts:15
1 node_modules/uniffi-bindgen-react-native/typescript/src/callbacks.ts:36
1 node_modules/uniffi-bindgen-react-native/typescript/src/enums.ts:7
1 node_modules/uniffi-bindgen-react-native/typescript/src/errors.ts:41
5 node_modules/uniffi-bindgen-react-native/typescript/src/ffi-converters.ts:66
3 node_modules/uniffi-bindgen-react-native/typescript/src/objects.ts:16
1 node_modules/uniffi-bindgen-react-native/typescript/src/rust-call.ts:14
1 src/generated/foobar-ffi.ts:300
38 src/generated/foobar.ts:4
✖ Failed to build definition files.
The errors above are caused by two issues:
- Generated files being type-checked (Prevent TypeScript from checking generated files for errors #197)
-
uniffi-bindgen-react-native
TypeScript source provided as-is without compiling to JavaScript (Compile TypeScript to JavaScript before publishing to npm #198)
I've opened draft PRs for both issues, would love to get feedback on them.
Metadata
Metadata
Assignees
Labels
No labels