API reference › @evolu/common › Worker › NativeMessagePort
type NativeMessagePort<Input, Output> = Brand<"NativeMessagePort"> & {
[nativeMessagePortInput]?: Input;
[nativeMessagePortOutput]?: Output;
};
Defined in: packages/common/src/Worker.ts:91
Opaque type for platform-specific native MessagePort.
Exists because postMessage transfer requires the native object itself, not
a wrapper. Ensures type-safe wiring between MessagePort.native and
CreateMessagePort without exposing platform details.
Type Declaration
| Name | Type | Defined in |
|---|---|---|
[nativeMessagePortInput]? | Input | packages/common/src/Worker.ts:95 |
[nativeMessagePortOutput]? | Output | packages/common/src/Worker.ts:96 |