Installation
npm install --save @types/mapbox__link-hijacker
Summary
This package contains type definitions for @mapbox/link-hijacker (https://github.com/mapbox/link-hijacker).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__link-hijacker.
index.d.ts
interface Options {
root?: EventTarget;
skipFilter?(link: HTMLAnchorElement): boolean;
skipModifierKeys?: boolean;
skipDownload?: boolean;
skipTargetBlank?: boolean;
skipExternal?: boolean;
skipMailTo?: boolean;
skipOtherOrigin?: boolean;
skipFragment?: boolean;
preventDefault?: boolean;
}
interface Unhijack {
(): void;
}
interface Callback {
(link: HTMLAnchorElement, event: MouseEvent): void;
}
declare function hijack(options: Options, callback: Callback): Unhijack;
declare function hijack(callback: Callback): Unhijack;
declare const linkHijacker: {
hijack: typeof hijack;
};
export = linkHijacker;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: none
Credits
These definitions were written by tpluscode.