forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
41 lines (32 loc) · 1017 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Type definitions for anchor-js 4.1
// Project: https://github.com/bryanbraun/anchorjs
// Definitions by: Brian Surowiec <https://github.com/xt0rted>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace anchorjs {
interface Anchor {
options: AnchorOptions;
add(selector?: string): Anchor;
remove(selector?: string): Anchor;
removeAll(): void;
}
type AnchorPlacement = 'left' | 'right';
type AnchorVisibility = 'always' | 'hover' | 'touch';
interface AnchorOptions {
arialabel?: string;
class?: string;
icons?: string;
placement?: AnchorPlacement;
truncate?: number;
visible?: AnchorVisibility;
}
interface AnchorStatic {
new(options?: AnchorOptions): Anchor;
}
}
declare const anchors: anchorjs.Anchor;
declare const AnchorJS: anchorjs.AnchorStatic;
export = AnchorJS;
export as namespace AnchorJS;
declare global {
const anchors: anchorjs.Anchor;
}