Skip to content

Commit 53f5dbe

Browse files
authored
Fix typing of shouldIgnoreEntity (#2906)
1 parent 725952a commit 53f5dbe

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.changeset/famous-bags-report.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@gitbook/openapi-parser': patch
3+
---
4+
5+
Fix typing of `shouldIgnoreEntity`

packages/openapi-parser/src/helpers/shouldIgnoreEntity.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import type { OpenAPIV3 } from '@scalar/openapi-types';
44
* Check if an entity should be ignored
55
*/
66
export function shouldIgnoreEntity(
7-
data:
8-
| undefined
9-
| Pick<OpenAPIV3.TagObject, 'x-internal' | 'x-gitbook-ignore'>
10-
| Pick<OpenAPIV3.OperationObject, 'x-internal' | 'x-gitbook-ignore'>
7+
data: undefined | OpenAPIV3.TagObject | OpenAPIV3.OperationObject
118
) {
129
return data?.['x-internal'] === true || data?.['x-gitbook-ignore'] === true;
1310
}

0 commit comments

Comments
 (0)