From d43f7d790a1355575c3136d9dd571c50a772bd3c Mon Sep 17 00:00:00 2001 From: "Anthony Fu (via agent)" Date: Wed, 15 Jul 2026 01:01:08 +0000 Subject: [PATCH] fix(devframe): add force? param to RpcFunctionsCollector register/update The RpcFunctionsCollector interface omitted the force? argument that the concrete RpcFunctionsCollectorBase class and its runtime already support. Because the client-side host is typed off the interface (via DevframeClientRpcHost), calling register(fn, true) / update(fn, true) on the client was a type error and required a cast even though it works at runtime. Align the interface with the implementation. --- packages/devframe/src/rpc/types.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/devframe/src/rpc/types.ts b/packages/devframe/src/rpc/types.ts index 9a670ace..370c08e6 100644 --- a/packages/devframe/src/rpc/types.ts +++ b/packages/devframe/src/rpc/types.ts @@ -72,10 +72,10 @@ export interface RpcFunctionsCollector readonly functions: LocalFunctions /** Map of registered function definitions keyed by function name */ readonly definitions: Map> - /** Register a new function definition */ - register: (fn: RpcFunctionDefinitionAnyWithContext) => void - /** Update an existing function definition */ - update: (fn: RpcFunctionDefinitionAnyWithContext) => void + /** Register a new function definition. Pass `force` to overwrite an existing one. */ + register: (fn: RpcFunctionDefinitionAnyWithContext, force?: boolean) => void + /** Update an existing function definition. Pass `force` to register it if it doesn't exist yet. */ + update: (fn: RpcFunctionDefinitionAnyWithContext, force?: boolean) => void /** Subscribe to function changes, returns unsubscribe function */ onChanged: (fn: (id?: string) => void) => (() => void) }