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

3.0.5 • Public • Published

Installation

npm install --save @types/issue-parser

Summary

This package contains type definitions for issue-parser (https://github.com/pvdlg/issue-parser#readme).

Details

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

index.d.ts

declare function issueParser(
    authOptions?: issueParser.Options,
    extension?: issueParser.Overrides,
): issueParser.Parser;

declare namespace issueParser {
    type Parser = (text: string) => Result;
    interface Overrides {
        actions?: {
            [type: string]: readonly string[];
        } | undefined;
        delimiters?: string | readonly string[] | undefined;
        mentionsPrefixes?: string | readonly string[] | undefined;
        issuePrefixes?: string | readonly string[] | undefined;
        hosts?: string | readonly string[] | undefined;
        issueURLSegments?: string | readonly string[] | undefined;
        overrides?: string | readonly string[] | undefined;
    }
    type Options = "github" | "gitlab" | "bitbucket" | "waffle" | Overrides;
    interface Reference {
        raw: string;
        slug: string | undefined;
        prefix: string | undefined;
        issue: string;
    }
    interface Mention {
        raw: string;
        prefix: string;
        user: string;
    }
    interface Action {
        raw: string;
        action: string;
        slug: string | undefined;
        prefix: string | undefined;
        issue: string;
    }
    interface Actions {
        [action: string]: readonly Action[];
    }
    interface Result {
        refs: readonly Reference[];
        mentions: readonly Mention[];
        actions: Actions;
        allRefs: Array<Reference | Action>;
    }
}

export = issueParser;

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:24 GMT
  • Dependencies: none

Credits

These definitions were written by Leko.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/issue-parser

Weekly Downloads

322

Version

3.0.5

License

MIT

Unpacked Size

5.47 kB

Total Files

5

Last publish

Collaborators

  • types