@types/jayrbolton__suffix-tree
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Installation

npm install --save @types/jayrbolton__suffix-tree

Summary

This package contains type definitions for @jayrbolton/suffix-tree (https://www.npmjs.com/package/@jayrbolton/suffix-tree).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jayrbolton__suffix-tree.

index.d.ts

export interface STree {
    activeNode: SNode;
    root: SNode;
    left: number;
    right: number;
    idx: number;
    lastID: number;
    strings: { [id: number]: string };
    skip: number;
    text: string[];
}
export interface SNode {
    start: number;
    children: { [char: string]: SNode };
    id: number;
    parent: SNode;
}

export function create(str?: string): STree;

export function add(str: string, tree: STree): STree;
export function addSingle(char: number | string, tree: STree): STree;

export function getStringByIndex(idx: number, tree: STree): string;
export function findSuffix(suffix: string, tree: STree): number[];
export function allSuffixes(tree: STree): string[];

export function format(tree: STree): string;

Additional Details

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

Credits

These definitions were written by Unlocked.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/jayrbolton__suffix-tree

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

4.15 kB

Total Files

5

Last publish

Collaborators

  • types