Novice Pokémon Master

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

    4.2.1 • Public • Published

    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.

    Keywords

    none

    Install

    npm i @types/anchor-js

    DownloadsWeekly Downloads

    1,061

    Version

    4.2.1

    License

    MIT

    Unpacked Size

    4.89 kB

    Total Files

    4

    Last publish

    Collaborators

    • types