1.2.3 • Published 6 months ago
@types/highlight-words-core v1.2.3
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
// Type definitions for highlight-words-core 1.2
// Project: https://github.com/bvaughn/highlight-words-core
// Definitions by: James Lismore <https://github.com/jlismore>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
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: Thu, 08 Jul 2021 14:22:51 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by James Lismore.