diff --git a/packages/devframe/src/rpc/types.ts b/packages/devframe/src/rpc/types.ts index 9a670ac..370c08e 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) }