( /** * The entity type name. */ type: Type, /** * The schema definition for messages that the entity is capable of * processing. */ protocol: RpcGroup.RpcGroup<Rpcs> )
| 403 | /** |
| 404 | * Creates a new `Entity` of the specified `type` which will accept messages |
| 405 | * that adhere to the provided `RpcGroup`. |
| 406 | * |
| 407 | * @category constructors |
| 408 | * @since 4.0.0 |
| 409 | */ |
| 410 | export const fromRpcGroup = <const Type extends string, Rpcs extends Rpc.Any>( |
| 411 | /** |
| 412 | * The entity type name. |
| 413 | */ |
| 414 | type: Type, |
| 415 | /** |
| 416 | * The schema definition for messages that the entity is capable of |
| 417 | * processing. |
| 418 | */ |
| 419 | protocol: RpcGroup.RpcGroup<Rpcs> |
| 420 | ): Entity<Type, Rpcs> => { |
| 421 | const self = Object.create(Proto) |
| 422 | self.type = EntityType.make(type) |
| 423 | self.protocol = protocol |
| 424 | self.getShardGroup = Context.get(protocol.annotations, ShardGroup) |
no test coverage detected
searching dependent graphs…