mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add definitions for SwiftClick
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
/// <reference path="swiftclick.d.ts" />
|
||||
|
||||
var swiftClick = SwiftClick.attach(document.body);
|
||||
|
||||
swiftClick.replaceNodeNamesToTrack(["a", "div", "h1"]);
|
||||
swiftClick.addNodeNamesToTrack(["li"]);
|
||||
swiftClick.useCssParser(true);
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
// Type definitions for SwiftClick v1.2.0
|
||||
// Project: https://github.com/munkychop/swiftclick
|
||||
// Definitions by: Laurence C <https://github.com/Laurence-C>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface SwiftClickObject {
|
||||
addNodeNamesToTrack(nodeNamesArray: string[]): void;
|
||||
replaceNodeNamesToTrack(nodeNamesArray: string[]): void;
|
||||
useCssParser(useParser: boolean): void;
|
||||
}
|
||||
|
||||
interface SwiftClickStatic {
|
||||
attach(contextEl: Element): SwiftClickObject;
|
||||
}
|
||||
|
||||
declare module "swiftclick" {
|
||||
export = SwiftClick;
|
||||
}
|
||||
|
||||
declare var SwiftClick: SwiftClickStatic;
|
||||
Reference in New Issue
Block a user