@types/angularjs-dragula
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

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

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

Credits

These definitions were written by Piotr Błażejewicz.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/angularjs-dragula

Weekly Downloads

45

Version

2.0.3

License

MIT

Unpacked Size

6.12 kB

Total Files

5

Last publish

Collaborators

  • types