@lynx-js/react / import-attributes
runtime: 'shared'Explicitly declare that certain modules can be shared between the main thread and the background thread via Import Attributes.
This is strictly for use with Main Thread Functions. For details, please refer to Cross-thread Shared Modules.
The runtime attribute in the with clause of an import statement specifies the runtime behavior of the imported module. When set to 'shared', the module is marked as shared across threads.
runtime: 'shared'import ... with { runtime: 'shared' } are recognized as shared.MainThreadRef) unless explicitly marked with 'main thread'.