mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
40 lines
1.4 KiB
TypeScript
40 lines
1.4 KiB
TypeScript
// Type definitions for angular-modal 0.5.0
|
|
// Project: https://github.com/btford/angular-modal
|
|
// Definitions by: Paul Lessing <https://github.com/paullessing>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.3
|
|
|
|
/// <reference types="angular" />
|
|
|
|
declare namespace angularModal {
|
|
|
|
type AngularModalControllerDefinition = (new (...args: any[]) => any) | Function | string; // Possible arguments to IControllerService
|
|
|
|
type AngularModalJQuerySelector = string | Element | Element[] | JQuery | Function | any[] | {}; // Possible arguments to IAugmentedJQueryStatic
|
|
|
|
interface AngularModalSettings {
|
|
controller?: AngularModalControllerDefinition;
|
|
controllerAs?: string;
|
|
container?: AngularModalJQuerySelector;
|
|
}
|
|
|
|
export interface AngularModalSettingsWithTemplate extends AngularModalSettings {
|
|
template: any;
|
|
}
|
|
|
|
export interface AngularModalSettingsWithTemplateUrl extends AngularModalSettings {
|
|
templateUrl: string;
|
|
}
|
|
|
|
export interface AngularModal {
|
|
activate(locals?: {}): angular.IPromise<void>;
|
|
activate<T>(locals: T): angular.IPromise<void>;
|
|
deactivate(): angular.IPromise<void>;
|
|
active(): boolean;
|
|
}
|
|
|
|
export interface AngularModalFactory {
|
|
(settings: AngularModalSettingsWithTemplate | AngularModalSettingsWithTemplateUrl): AngularModal;
|
|
}
|
|
}
|