5.0.3 • Published 6 months ago

@types/anchor-js v5.0.3

Weekly downloads
1,304
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/anchor-js

Summary

This package contains type definitions for anchor-js (https://github.com/bryanbraun/anchorjs).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/anchor-js.

index.d.ts

// Type definitions for anchor-js 4.2
// 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 | undefined;
        base?: string | undefined;
        class?: string | undefined;
        icon?: string | undefined;
        placement?: AnchorPlacement | undefined;
        titleText?: string | undefined;
        truncate?: number | undefined;
        visible?: AnchorVisibility | undefined;
    }

    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;
}

Additional Details

  • Last updated: Wed, 07 Jul 2021 21:44:15 GMT
  • Dependencies: none
  • Global values: AnchorJS

Credits

These definitions were written by Brian Surowiec.

5.0.3

6 months ago

5.0.2

7 months ago

5.0.1

8 months ago

5.0.0

1 year ago

4.2.1

3 years ago

4.2.0

4 years ago

4.1.0

6 years ago