From 622450192d253655cce284ee1fd83683585f4954 Mon Sep 17 00:00:00 2001 From: imccyu <276526105+imccyu@users.noreply.github.com> Date: Thu, 30 Jul 2026 01:40:10 +0800 Subject: [PATCH] fix(client): mark the parallel register overloads for the clone gate The two overload declarations differ only in the inject share; folding them would lose per-overload inference of I, so the duplication is deliberate. --- packages/client/ui-slots/src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/client/ui-slots/src/index.ts b/packages/client/ui-slots/src/index.ts index 2e4ce278b5..1f5c1ebd57 100644 --- a/packages/client/ui-slots/src/index.ts +++ b/packages/client/ui-slots/src/index.ts @@ -500,6 +500,9 @@ export class SlotCore { * @returns disposer removing the registration and its declarations * (idempotent; stale disposers after a cascade are no-ops). */ + /* jscpd:ignore-start -- the two register overloads are deliberately + * parallel declarations differing only in the inject share; folding them + * would lose the per-overload inference of I. */ register< K extends keyof SlotMap & string, const D extends ChildrenDecl = Record, @@ -537,6 +540,7 @@ export class SlotCore { & SlotComponent & keyof SlotMap & string, HandleOf>, I, NoInfer, NoInfer>> & RendersCheck, ): () => void + /* jscpd:ignore-end */ register(options: ErasedOptions, component: unknown): () => void { const rec = this.records.get(options.name) if (!rec?.spec) {