function injectCommand<TArgs extends readonly unknown[], TReturn>(command: (...args: TArgs) => TReturn, options?: InjectCommandOptions): CommandHandle<TArgs, Awaited<TReturn>>; Tracks a command's pending state and failure as signals for the lifetime of the injection context. The command may read signals, such as a client:
readonly increment = injectCommand(() => this.counter.client()?.increment());
// <button [disabled]="!counter.client() || increment.pending()" (click)="increment.run()">