npm.io
1.2.3 • Published 2 years ago

@types/highlight-words-core

Licence
MIT
Version
1.2.3
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.3K

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 0337 GMT
  • Dependencies: none

Credits

These definitions were written by James Lismore.