@types/mapbox__link-hijacker
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/mapbox__link-hijacker

Weekly Downloads

0

Version

1.1.3

License

MIT

Unpacked Size

3.95 kB

Total Files

5

Last publish

Collaborators

  • types