mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add tether typings
This commit is contained in:
Vendored
+50
@@ -0,0 +1,50 @@
|
||||
// Type definitions for Tether v0.6
|
||||
// Project: http://github.hubspot.com/tether/
|
||||
// Definitions by: Adi Dahiya <https://github.com/adidahiya>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module tether {
|
||||
|
||||
interface TetherStatic {
|
||||
new(options: ITetherOptions): Tether;
|
||||
}
|
||||
|
||||
interface ITetherOptions {
|
||||
attachment?: string;
|
||||
classes?: {[className: string]: boolean};
|
||||
classPrefix?: string;
|
||||
constraints?: ITetherConstraint[];
|
||||
element?: Element | string | any /* JQuery */;
|
||||
enabled?: boolean;
|
||||
offset?: string;
|
||||
optimizations?: any;
|
||||
target?: Element | string | any /* JQuery */;
|
||||
targetAttachment?: string;
|
||||
targetOffset?: string;
|
||||
targetModifier?: string;
|
||||
}
|
||||
|
||||
interface ITetherConstraint {
|
||||
attachment?: string;
|
||||
outOfBoundsClass?: string;
|
||||
pin?: boolean | string[];
|
||||
pinnedClass?: string;
|
||||
to?: string | Element | number[];
|
||||
}
|
||||
|
||||
interface Tether {
|
||||
setOptions(options: ITetherOptions): void;
|
||||
disable(): void;
|
||||
enable(): void;
|
||||
destroy(): void;
|
||||
position(): void;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
declare module "tether" {
|
||||
export = tether;
|
||||
}
|
||||
|
||||
declare var Tether: tether.TetherStatic;
|
||||
|
||||
Reference in New Issue
Block a user