1 | // Type definitions for conventional-changelog 3.1
|
2 | // Project: https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog#readme
|
3 | // Definitions by: Jason Kwok <https://github.com/JasonHK>
|
4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
5 | // TypeScript Version: 2.9
|
6 |
|
7 | /// <reference types="node" />
|
8 |
|
9 | import * as Stream from "stream";
|
10 |
|
11 | import {
|
12 | Context,
|
13 | GitRawCommitsOptions,
|
14 | ParserOptions,
|
15 | WriterOptions,
|
16 | Options as BaseOptions,
|
17 | } from "conventional-changelog-core";
|
18 | import { Context as WriterContext } from "conventional-changelog-writer";
|
19 | import { Commit } from "conventional-commits-parser";
|
20 |
|
21 | /**
|
22 | * Returns a readable stream.
|
23 | *
|
24 | * @param options
|
25 | * @param context
|
26 | * @param gitRawCommitsOpts
|
27 | * @param parserOpts
|
28 | * @param writerOpts
|
29 | */
|
30 | // tslint:disable-next-line max-line-length
|
31 | declare function conventionalChangelog<TCommit extends Commit = Commit, TContext extends WriterContext = Context>(options?: Options<TCommit, TContext>, context?: Partial<TContext>, gitRawCommitsOpts?: GitRawCommitsOptions, parserOpts?: ParserOptions, writerOpts?: WriterOptions<TCommit, TContext>): Stream.Readable;
|
32 |
|
33 | declare namespace conventionalChangelog {
|
34 | /**
|
35 | * See the [conventional-changelog-core](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-core)
|
36 | * docs. The API is the same with the following changes or additions:
|
37 | */
|
38 | interface Options<TCommit extends Commit = Commit, TContext extends WriterContext = WriterContext> extends BaseOptions<TCommit, TContext> {
|
39 | /**
|
40 | * It's recommended to use a preset so you don't have to define everything
|
41 | * yourself. Presets are names of built-in `config`.
|
42 | *
|
43 | * A scoped preset package such as `@scope/conventional-changelog-custom-preset`
|
44 | * can be used by passing `@scope/custom-preset` to this option.
|
45 | *
|
46 | * @remarks
|
47 | * `options.config` will be overwritten by the values of preset. You should use
|
48 | * either `preset` or `config`, but not both.
|
49 | */
|
50 | preset?: string | undefined;
|
51 | }
|
52 | }
|
53 |
|
54 | type Options<TCommit extends Commit = Commit, TContext extends WriterContext = WriterContext> = conventionalChangelog.Options<TCommit, TContext>;
|
55 |
|
56 | export = conventionalChangelog;
|