5.0.3 • Published 6 months ago
@types/anchor-js v5.0.3
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.