[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Worker](https://evolu.dev/docs/api-reference/common/Worker) › NativeMessagePort

```ts
type NativeMessagePort<Input, Output> = Brand<"NativeMessagePort"> & {
  [nativeMessagePortInput]?: Input;
  [nativeMessagePortOutput]?: Output;
};
```

Defined in: [packages/common/src/Worker.ts:105](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Worker.ts#L105)

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](https://evolu.dev/docs/api-reference/common/Worker/interfaces/MessagePort#native) and
[CreateMessagePort](https://evolu.dev/docs/api-reference/common/Worker/type-aliases/CreateMessagePort) without exposing platform details.

## Type Declaration

| Name                         | Type     | Defined in                                                                                                                                             |
| ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `[nativeMessagePortInput]?`  | `Input`  | [packages/common/src/Worker.ts:109](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Worker.ts#L109) |
| `[nativeMessagePortOutput]?` | `Output` | [packages/common/src/Worker.ts:110](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Worker.ts#L110) |