@ssv/ngx.command
Version:
Command pattern implementation for angular. Command used to encapsulate information which is needed to perform an action.
25 lines (24 loc) • 1.21 kB
TypeScript
import { OnInit, OnDestroy } from "@angular/core";
import { type CommandOptions } from "./command.options";
import { CommandCreator, type ICommand } from "./command.model";
import * as i0 from "@angular/core";
export declare class CommandDirective implements OnInit, OnDestroy {
private readonly globalOptions;
private readonly renderer;
private readonly element;
private readonly cdr;
commandOrCreator: ICommand | CommandCreator | undefined;
get commandOptions(): CommandOptions;
set commandOptions(value: Partial<CommandOptions>);
commandParams: unknown | unknown[];
get command(): ICommand;
private _command;
private _commandOptions;
private _destroy$;
ngOnInit(): void;
onClick(): void;
ngOnDestroy(): void;
private trySetDisabled;
static ɵfac: i0.ɵɵFactoryDeclaration<CommandDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<CommandDirective, "[ssvCommand]", ["ssvCommand"], { "commandOrCreator": { "alias": "ssvCommand"; "required": false; }; "commandOptions": { "alias": "ssvCommandOptions"; "required": false; }; "commandParams": { "alias": "ssvCommandParams"; "required": false; }; }, {}, never, never, true, never>;
}