File tree 3 files changed +61
-0
lines changed
3 files changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * @file Type Tests - PromptConfig
3
+ * @module commitlint-config/interfaces/tests/unit-d/PromptConfig
4
+ */
5
+
6
+ import type { Questions } from '#src/types'
7
+ import type * as commitlint from '@commitlint/types'
8
+ import type TestSubject from '../config-prompt'
9
+
10
+ describe ( 'unit-d:interfaces/PromptConfig' , ( ) => {
11
+ it ( 'should extend commitlint.PromptConfig' , ( ) => {
12
+ expectTypeOf < TestSubject > ( ) . toMatchTypeOf < commitlint . PromptConfig > ( )
13
+ } )
14
+
15
+ it ( 'should match [questions: Questions]' , ( ) => {
16
+ expectTypeOf < TestSubject > ( )
17
+ . toHaveProperty ( 'questions' )
18
+ . toEqualTypeOf < Questions > ( )
19
+ } )
20
+ } )
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @file Interfaces - PromptConfig
3
+ * @module commitlint-config/interfaces/PromptConfig
4
+ */
5
+
6
+ import type { Questions } from '#src/types'
7
+ import type * as commitlint from '@commitlint/types'
8
+
9
+ /**
10
+ * Object representing prompt configuration used by `@commitlint/cz-commitlint`.
11
+ *
12
+ * @see https://commitlint.js.org/#/reference-prompt
13
+ * @see https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/cz-commitlint
14
+ *
15
+ * @extends {commitlint.PromptConfig }
16
+ */
17
+ interface PromptConfig extends commitlint . PromptConfig {
18
+ /**
19
+ * Message hints.
20
+ *
21
+ * @see https://commitlint.js.org/#/reference-prompt?id=messages
22
+ */
23
+ messages : commitlint . PromptConfig [ 'messages' ]
24
+
25
+ /**
26
+ * Interactive steps.
27
+ *
28
+ * @see https://commitlint.js.org/#/reference-prompt?id=questions
29
+ */
30
+ questions : Questions
31
+
32
+ /**
33
+ * Additional prompt settings.
34
+ *
35
+ * @see https://commitlint.js.org/#/reference-prompt?id=settings
36
+ */
37
+ settings : commitlint . PromptConfig [ 'settings' ]
38
+ }
39
+
40
+ export type { PromptConfig as default }
Original file line number Diff line number Diff line change 3
3
* @module commitlint-config/interfaces
4
4
*/
5
5
6
+ export type { default as PromptConfig } from './config-prompt'
6
7
export type { default as ParserOptions } from './options-parser'
You can’t perform that action at this time.
0 commit comments