Skip to content

Commit 60846b3

Browse files
committed
refactor: updated type of properties array
1 parent a3a55d3 commit 60846b3

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/types.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
import type { AnyRuleConfig, Plugin, RuleConfigQuality } from '@commitlint/types';
22

3-
export type RemoveIndex<T> = {
4-
[K in keyof T as symbol extends K ? never : string extends K ? never : number extends K ? never : K]: T[K];
5-
};
6-
73
export type CommitLintRule = Plugin['rules'][string];
84

95
export type RuleParameters = Parameters<CommitLintRule>;
106

117
export type Commit = RuleParameters[0];
128

13-
export type CommitBase = RemoveIndex<RuleParameters[0]>;
14-
15-
export const properties = ['body', 'footer', 'header', 'scope', 'subject', 'type'] satisfies (keyof CommitBase)[];
9+
export const properties = ['body', 'footer', 'header', 'scope', 'subject', 'type'] satisfies (keyof Commit)[];
1610

1711
export type CommitProperty = (typeof properties)[number];
1812

0 commit comments

Comments
 (0)