Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
Ring
AWS
ドキュメント
Support
Contact Us
My Cases
開発
設計と開発
公開
リファレンス
サポート
メインコンテンツへスキップ
The Turbo Module API package provides the Vega Codegen tool to simplify the code generation process. Vega Codegen generates native signatures and scaffolding code from a TypeScript interface definition of a Turbo Module. Note: To avoid caching the packages globally, run npm install before running Codegen. The following example shows how to run the tool.
The tool offers the following options:
  • -n, --new: Writes implementation templates (and overwrites existing implementations with the same name). Existing files are saved with .bak extension.
  • -o, --outputPath: Specifies where to generate the native files.
  • -s, --namespace: The C++ namespace of your TurboModule. Defaults to myTurboModule.
  • -c, --className: The C++ class name used in the generated code. Defaults to match your TurboModuleRegistry call from the TypeScript interface.
  • -f, --outFile: The name to use to generate the file names. Defaults to match your TurboModuleRegistry call from the TypeScript interface.
After running the tool, you can add your implementations in src/kepler/NativeModules/SampleTurboModule.cpp. For additional details on running the tool, see Vega Codegen FAQ. For example implementations with more complex types. see Advanced Turbo Module topics.
最終更新日 2025年10月2日