# @types/awesomplete

> TypeScript definitions for awesomplete

Latest version **1.1.16** (published 2024-08-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/awesomplete
pnpm add @types/awesomplete
yarn add @types/awesomplete
bun add @types/awesomplete
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.16 |
| Published | 2024-08-15 |
| First published | 2016-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51442 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/awesomplete
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/awesomplete
- npm.io page: https://npm.io/package/@types/awesomplete

## Recent versions

- 1.1.16 (latest) — 2024-08-15
- 1.1.15 (ts4.5) — 2023-11-17
- 1.1.11 (ts3.8) — 2021-07-07
- 1.1.10 (ts2.7) — 2019-10-22
- 1.1.14 — 2023-11-06
- 1.1.13 — 2023-10-17
- 1.1.12 — 2023-09-22
- 1.1.9 — 2019-04-10
- 1.1.8 — 2018-05-19
- 1.1.7 — 2018-05-01
- 1.1.6 — 2017-08-21
- 1.1.5 — 2017-03-31
- 1.1.4 — 2017-03-21
- 1.1.3 — 2017-03-11
- 1.1.2 — 2016-11-05
- … 1 more at https://npm.io/package/@types/awesomplete/versions

## README

# Installation
> `npm install --save @types/awesomplete`

# Summary
This package contains type definitions for awesomplete (https://leaverou.github.io/awesomplete/).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/awesomplete.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/awesomplete/index.d.ts)
````ts
declare class Awesomplete {
    constructor(input: Element | HTMLElement | string, o?: Awesomplete.Options);
    static all: any[];
    static $$(expr: string | ParentNode, con?: any): NodeList;
    static ITEM: (text: string, input: string) => HTMLElement;
    static $: {
        (expr: string | Element, con?: ParentNode): string | Element;
        regExpEscape(s: { replace(arg0: RegExp, arg1: string): void }): any;
        create(tag: string, o: any): HTMLElement;
        fire(target: EventTarget, type: string, properties: any): any;
        siblingIndex(el: Element): number;
    };
    static FILTER_STARTSWITH: (text: string, input: string) => boolean;
    static FILTER_CONTAINS: (text: string, input: string) => boolean;
    static SORT_BYLENGTH: (left: number | any[], right: number | any[]) => number;
    static REPLACE: (text: string) => void;
    static DATA: (item: Awesomplete.Suggestion) => Awesomplete.Suggestion;
    next: () => void;
    container: HTMLElement;
    select: (selected?: HTMLElement, originalTarget?: HTMLElement) => void;
    previous: () => void;
    index: number;
    opened: number;
    list: string | Element | Awesomplete.Suggestion[];
    input: HTMLElement | string;
    goto: (i: number) => void;
    ul: HTMLElement;
    close: () => void;
    evaluate: () => void;
    selected: boolean;
    open: () => void;
    status: HTMLElement;
    destroy: () => void;
}

declare namespace Awesomplete {
    type Suggestion = string | { label: string | any; value: string | any } | [string, string];
    type SortFunction = (left: number | any[], right: number | any[]) => number;

    interface Options {
        list?: string | string[] | Element | Array<{ label: string; value: any }> | Array<[string, string]> | undefined;
        minChars?: number | undefined;
        maxItems?: number | undefined;
        autoFirst?: boolean | undefined;
        data?(item: Suggestion, input: string): string;
        filter?(text: string, input: string): boolean;
        sort?: boolean | SortFunction | undefined;
        item?(text: string, input: string, item_id: number): HTMLElement;
        replace?(suggestion: string | Suggestion): void;
        container?(input: HTMLElement): HTMLElement;
    }
}

export = Awesomplete;
export as namespace Awesomplete;

````

### Additional Details
 * Last updated: Thu, 15 Aug 2024 11:07:04 GMT
 * Dependencies: none

# Credits
These definitions were written by [webbiesdk](https://github.com/webbiesdk), [Ben Dixon](https://github.com/bmdixon), [Trevor Bekolay](https://github.com/tbekolay), and [Chris LoPresto](https://github.com/chrislopresto).

---
_Source: https://npm.io/package/@types/awesomplete · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
