Installation
npm install --save @types/ng-command
Summary
This package contains type definitions for ng-command (https://github.com/stephenlautier/ng-command).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ng-command.
index.d.ts
/// <reference types="angular" />
declare namespace ngCommand {
var ModuleName: string;
/**
* Command proxy object.
*/
interface ICommand {
/**
* Determines whether the command is currently executing.
*/
isExecuting: boolean;
/**
* Determines whether the command can execute or not.
*/
canExecute: boolean;
/**
* Executes the command function.
*/
execute: () => angular.IPromise<any>;
}
class Command implements ICommand {
static id: string;
isExecuting: boolean;
canExecute: boolean;
constructor($scope: angular.IScope, execute: () => angular.IPromise<any>, canExecute?: () => boolean);
execute(): angular.IPromise<any>;
}
/**
* Command factory which creates instances of @see ICommand.
*/
interface ICommandFactory {
/**
* Factory instance creator method.
* @param $scope Scope which will keep track of the command.
* @param execute The execute function when the command is executed.
* @param canExecute Additional function which determines whether the command can executes.
*/
($scope: angular.IScope, execute: () => angular.IPromise<any>, canExecute?: () => boolean): ICommand;
}
}
Additional Details
- Last updated: Tue, 30 Jan 2024 21:35:45 GMT
- Dependencies: @types/angular
Credits
These definitions were written by Stephen Lautier.