Skip to content

Commit bf25f3f

Browse files
refactor(openapi-generator): fixed unsound type declaration
1 parent 943f709 commit bf25f3f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/openapi-generator/src/jsdoc.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
import type { Block } from 'comment-parser';
22

3+
type Tags = Record<Exclude<string, 'example'>, string> & { example?: any };
4+
35
export type JSDoc = {
46
summary?: string;
57
description?: string;
6-
tags?: Record<string, string> & { example?: unknown };
8+
tags?: Tags;
79
};
810

911
export function parseCommentBlock(comment: Block): JSDoc {
1012
let summary: string = '';
1113
let description: string = '';
12-
let tags: Record<string, string> & { example?: any } = {};
14+
let tags: Tags = {};
1315
let writingExample = false;
1416

1517
for (const line of comment.source) {

0 commit comments

Comments
 (0)