fix(server): expose id property on ServerConnection type (#372)
This commit is contained in:
7
.changeset/fix-server-connection-id-type.md
Normal file
7
.changeset/fix-server-connection-id-type.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"@esengine/server": patch
|
||||
---
|
||||
|
||||
fix: expose `id` property on ServerConnection type
|
||||
|
||||
TypeScript was not properly resolving the inherited `id` property from the base `Connection` interface in some module resolution scenarios. This fix explicitly declares the `id` property on `ServerConnection` to ensure it's always visible to consumers.
|
||||
@@ -70,6 +70,12 @@ export interface ServerConfig {
|
||||
* @en Server connection (extends RPC Connection)
|
||||
*/
|
||||
export interface ServerConnection<TData = Record<string, unknown>> extends Connection<TData> {
|
||||
/**
|
||||
* @zh 连接唯一标识(继承自 Connection)
|
||||
* @en Connection unique identifier (inherited from Connection)
|
||||
*/
|
||||
readonly id: string
|
||||
|
||||
/**
|
||||
* @zh 用户自定义数据
|
||||
* @en User-defined data
|
||||
|
||||
Reference in New Issue
Block a user