Skip to content

Commit 004cd6d

Browse files
Update packages/plugin-jsdocs/src/lib/runner/models.ts
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
1 parent cad4218 commit 004cd6d

File tree

1 file changed

+17
-21
lines changed
  • packages/plugin-jsdocs/src/lib/runner

1 file changed

+17
-21
lines changed

packages/plugin-jsdocs/src/lib/runner/models.ts

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
11
import { SyntaxKind } from 'ts-morph';
22

33
/** The possible coverage types for documentation analysis */
4-
export const SINTAX_KIND_LITERAL_STRING = {
5-
CLASSES: 'classes',
6-
METHODS: 'methods',
7-
FUNCTIONS: 'functions',
8-
INTERFACES: 'interfaces',
9-
ENUMS: 'enums',
10-
VARIABLES: 'variables',
11-
PROPERTIES: 'properties',
12-
TYPES: 'types',
13-
} as const;
14-
154
export type CoverageType =
16-
(typeof SINTAX_KIND_LITERAL_STRING)[keyof typeof SINTAX_KIND_LITERAL_STRING];
5+
| 'classes'
6+
| 'methods'
7+
| 'functions'
8+
| 'interfaces'
9+
| 'enums'
10+
| 'variables'
11+
| 'properties'
12+
| 'types';
1713

1814
/** Maps the SyntaxKind from the library ts-morph to the coverage type. */
1915
export const SYNTAX_COVERAGE_MAP = new Map<SyntaxKind, CoverageType>([
20-
[SyntaxKind.ClassDeclaration, SINTAX_KIND_LITERAL_STRING.CLASSES],
21-
[SyntaxKind.MethodDeclaration, SINTAX_KIND_LITERAL_STRING.METHODS],
22-
[SyntaxKind.FunctionDeclaration, SINTAX_KIND_LITERAL_STRING.FUNCTIONS],
23-
[SyntaxKind.InterfaceDeclaration, SINTAX_KIND_LITERAL_STRING.INTERFACES],
24-
[SyntaxKind.EnumDeclaration, SINTAX_KIND_LITERAL_STRING.ENUMS],
25-
[SyntaxKind.VariableDeclaration, SINTAX_KIND_LITERAL_STRING.VARIABLES],
26-
[SyntaxKind.VariableStatement, SINTAX_KIND_LITERAL_STRING.VARIABLES],
27-
[SyntaxKind.PropertyDeclaration, SINTAX_KIND_LITERAL_STRING.PROPERTIES],
28-
[SyntaxKind.TypeAliasDeclaration, SINTAX_KIND_LITERAL_STRING.TYPES],
16+
[SyntaxKind.ClassDeclaration, 'classes'],
17+
[SyntaxKind.MethodDeclaration, 'methods'],
18+
[SyntaxKind.FunctionDeclaration, 'functions'],
19+
[SyntaxKind.InterfaceDeclaration, 'interfaces'],
20+
[SyntaxKind.EnumDeclaration, 'enums'],
21+
[SyntaxKind.VariableDeclaration, 'variables'],
22+
[SyntaxKind.VariableStatement, 'variables'],
23+
[SyntaxKind.PropertyDeclaration, 'properties'],
24+
[SyntaxKind.TypeAliasDeclaration, 'types'],
2925
]);
3026

3127
/** The undocumented node is the node that is not documented and has the information for the report. */

0 commit comments

Comments
 (0)