Fix typing of shouldIgnoreEntity (#2906)

This commit is contained in:
Greg Bergé
2025-02-28 18:38:58 +01:00
committed by GitHub
parent 725952a106
commit 53f5dbea26
2 changed files with 6 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@gitbook/openapi-parser': patch
---
Fix typing of `shouldIgnoreEntity`
@@ -4,10 +4,7 @@ import type { OpenAPIV3 } from '@scalar/openapi-types';
* Check if an entity should be ignored
*/
export function shouldIgnoreEntity(
data:
| undefined
| Pick<OpenAPIV3.TagObject, 'x-internal' | 'x-gitbook-ignore'>
| Pick<OpenAPIV3.OperationObject, 'x-internal' | 'x-gitbook-ignore'>
data: undefined | OpenAPIV3.TagObject | OpenAPIV3.OperationObject
) {
return data?.['x-internal'] === true || data?.['x-gitbook-ignore'] === true;
}