1.1.3 • Published 6 months ago

@types/mapbox__link-hijacker v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for @mapbox/link-hijacker 1.1
// Project: https://github.com/mapbox/link-hijacker
// Definitions by: tpluscode <https://github.com/tpluscode>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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: Sat, 16 Oct 2021 11:01:20 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by tpluscode.

1.1.1

8 months ago

1.1.3

6 months ago

1.1.2

7 months ago

1.1.0

3 years ago