mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
30 lines
698 B
TypeScript
30 lines
698 B
TypeScript
// Type definitions for dragster 0.1
|
|
// Project: https://github.com/bensmithett/dragster
|
|
// Definitions by: Zsolt Kovacs <https://github.com/zskovacs>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
declare namespace Dragster {
|
|
interface Dragster {
|
|
removeListeners(): void;
|
|
reset(): void;
|
|
}
|
|
|
|
interface DragsterStatic {
|
|
(elem: HTMLElement): Dragster;
|
|
new (elem: HTMLElement): Dragster;
|
|
}
|
|
}
|
|
|
|
// Support through imports.
|
|
declare var Dragster: Dragster.DragsterStatic;
|
|
export = Dragster;
|
|
|
|
// Support as a global
|
|
export as namespace Dragster;
|
|
|
|
declare global {
|
|
interface Window {
|
|
Dragster: Dragster.DragsterStatic;
|
|
}
|
|
}
|