API reference / @node-ts/bus-messages / MessageTypeDefinition
Interface: MessageTypeDefinition
Defined in: packages/bus-messages/src/message-types.ts:26
How to restore one class or object type
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
class? | (...args) => object | The class restored objects are created from. They get its prototype, so instanceof, getters and methods work, but its constructor isn't run. Object types such as interfaces have no class and are restored as plain objects. | packages/bus-messages/src/message-types.ts:32 |
fields | object | The fields that need restoring, by name. Fields that aren't listed are kept as they were parsed. | packages/bus-messages/src/message-types.ts:37 |