Skip to content

Commit 38f794c

Browse files
committed
feat(interfaces): Note
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
1 parent 3018cd5 commit 38f794c

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

Diff for: src/interfaces/__tests__/note.spec-d.ts

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* @file Type Tests - Note
3+
* @module commitlint-config/interfaces/tests/unit-d/Note
4+
*/
5+
6+
import type { NoteKeyword } from '#src/types'
7+
import type TestSubject from '../note'
8+
9+
describe('unit-d:interfaces/Note', () => {
10+
it('should match [text: string]', () => {
11+
expectTypeOf<TestSubject>().toHaveProperty('text').toBeString()
12+
})
13+
14+
it('should match [title: NoteKeyword]', () => {
15+
expectTypeOf<TestSubject>()
16+
.toHaveProperty('title')
17+
.toEqualTypeOf<NoteKeyword>()
18+
})
19+
})

Diff for: src/interfaces/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
export type { default as Config } from './config'
77
export type { default as PromptConfig } from './config-prompt'
88
export type { default as RulesConfig } from './config-rules'
9+
export type { default as Note } from './note'
910
export type { default as ParserOptions } from './options-parser'
1011
export type { default as Reference } from './reference'
1112
export type { default as Revert } from './revert'

Diff for: src/interfaces/note.ts

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* @file Interfaces - Note
3+
* @module commitlint-config/interfaces/Note
4+
*/
5+
6+
import type { NoteKeyword } from '#src/types'
7+
8+
/**
9+
* Object representing a "BREAKING CHANGE" note.
10+
*/
11+
interface Note {
12+
/**
13+
* Note content.
14+
*/
15+
text: string
16+
17+
/**
18+
* Note title.
19+
*/
20+
title: NoteKeyword
21+
}
22+
23+
export type { Note as default }

0 commit comments

Comments
 (0)