@types/highlight-words-core
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

Installation

npm install --save @types/highlight-words-core

Summary

This package contains type definitions for highlight-words-core (https://github.com/bvaughn/highlight-words-core).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/highlight-words-core.

index.d.ts

export interface FindChunksArgs {
    autoEscape?: boolean | undefined;
    caseSensitive?: boolean | undefined;
    sanitize?: ((text: string) => string) | undefined;
    searchWords: string[];
    textToHighlight: string;
}

export interface Chunk {
    start: number;
    end: number;
    highlight: boolean;
}

export interface FindAllArgs extends FindChunksArgs {
    findChunks?: ((args: FindChunksArgs) => Chunk[]) | undefined;
}

export function findAll(args: FindAllArgs): Chunk[];

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by James Lismore.

Dependents (4)

Package Sidebar

Install

npm i @types/highlight-words-core

Weekly Downloads

56,298

Version

1.2.3

License

MIT

Unpacked Size

3.62 kB

Total Files

5

Last publish

Collaborators

  • types