2.0.3 • Published 6 months ago
@types/angularjs-dragula v2.0.3
Installation
npm install --save @types/angularjs-dragula
Summary
This package contains type definitions for angularjs-dragula (https://github.com/bevacqua/angularjs-dragula).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/angularjs-dragula.
index.d.ts
// Type definitions for angularjs-dragula 2.0
// Project: https://github.com/bevacqua/angularjs-dragula
// Definitions by: Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import angular = require('angular');
import d = require('dragula');
declare module 'angular' {
namespace dragula {
/**
* This service exposes a few different methods with which you can interact with `dragula` in the Angular way.
*/
interface DragulaService {
/**
* Creates a `bag` scoped under `scope` and identified by `name`. You should provide the entire `drake` instance.
* Typically, the directive takes care of this step.
*/
add(scope: IScope, name: string, drake: d.Drake): Bag;
/**
* Returns the `bag` for a s`drake` instance
*/
find(scope: IScope, name: string): Readonly<Bag> | undefined;
/**
* Sets the `options` used to instantiate a `drake`.
* Refer to the documentation for `dragula` to learn more about the options themselves.
*/
options(scope: IScope, name: string, options?: d.DragulaOptions): void;
/**
* Destroys a `drake` instance named `name` scoped under `scope`.
*/
destroy(scope: IScope, name: string): void;
/**
* models to sync with
*/
handleModels(scope: IScope, drake: d.Drake): void;
}
/**
* Grouping of containers is called a bag.
*/
interface Bag {
name: string;
drake: d.Drake;
}
}
}
declare function angularDragula(angular: angular.IAngularStatic): 'dragula';
export as namespace angularDragula;
export = angularDragula;
Additional Details
- Last updated: Wed, 23 Feb 2022 23:01:51 GMT
- Dependencies: @types/angular, @types/dragula
- Global values:
angularDragula
Credits
These definitions were written by Piotr Błażejewicz.