Is there support for advanced TypeScript types like aliases, generics?
Is there support for advanced TypeScript types like aliases, generics?
What types can I use in my TypeScript interface?
What types can I use in my TypeScript interface?
Int32, Float, and ArrayBuffer. See the type mapping table for a full list.Why am I seeing .bak files?
Why am I seeing .bak files?
--new flag, it generates template files for your Turbo Module implementation. Existing implementations with the same name are preserved via the .bak extension in case you have in-progress or previous implementation code which you want to transfer into the new files. You can delete the backup files once you no longer need to reference their contents.I'm familar with React Native's Codegen tool, how does this compare?
I'm familar with React Native's Codegen tool, how does this compare?
Why does Codegen generate Spec files?
Why does Codegen generate Spec files?
If you do find yourself needing to modify the
Spec files, be aware that re-running codegen will re-generate those files, overwriting your changes.Can I have multiple Turbo Modules in one package?
Can I have multiple Turbo Modules in one package?
Common error messages
throw new Error('Optional args are not supported by Vega Turbo Modules.');
throw new Error('Optional args are not supported by Vega Turbo Modules.');
(arg?: type), they should be required instead, as the Turbo Module will fail at runtime if the argument is not passed.Optional arguments can be supported by JavaScript wrappers around the Turbo Module.
'Unrecognized generic type 'undefined' in NativeModule spec.'
'Unrecognized generic type 'undefined' in NativeModule spec.'
Int32, Double, Float, etc.), can be imported from @amazon-devices/keplerscript-turbomodule-api and are supported by Codegen when imported that way.'Unrecognized generic type 'T' in Native Module spec.'
'Unrecognized generic type 'T' in Native Module spec.'
'TypeScript type annotation 'TSAnyKeyword' is unsupported in NativeModule specs.'
'TypeScript type annotation 'TSAnyKeyword' is unsupported in NativeModule specs.'
any is not a supported type for Codegen. Consider using a stricter type definition.
If you have a callback typed like (event: any) => void which actually accepts multiple types, you can use the CallbackParam type from @amazon-devices/keplerscript-turbomodule-api.'npm ERR! 404 Not Found - GET https://registry.npmjs.org/keplerscript-turbomodule-api - Not found'
'npm ERR! 404 Not Found - GET https://registry.npmjs.org/keplerscript-turbomodule-api - Not found'

