// Type definitions for issue-parser 3.0 // Project: https://github.com/pvdlg/issue-parser#readme // Definitions by: Leko // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 declare function issueParser( authOptions?: issueParser.Options, extension?: issueParser.Overrides ): issueParser.Parser; declare namespace issueParser { type Parser = (text: string) => Result; interface Overrides { actions?: { [type: string]: ReadonlyArray; }; delimiters?: string | ReadonlyArray; mentionsPrefixes?: string | ReadonlyArray; issuePrefixes?: string | ReadonlyArray; hosts?: string | ReadonlyArray; issueURLSegments?: string | ReadonlyArray; overrides?: string | ReadonlyArray; } 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]: ReadonlyArray; } interface Result { refs: ReadonlyArray; mentions: ReadonlyArray; actions: Actions; allRefs: Array; } } export = issueParser;