mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
Fix typing of shouldIgnoreEntity (#2906)
This commit is contained in:
@@ -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
|
* Check if an entity should be ignored
|
||||||
*/
|
*/
|
||||||
export function shouldIgnoreEntity(
|
export function shouldIgnoreEntity(
|
||||||
data:
|
data: undefined | OpenAPIV3.TagObject | OpenAPIV3.OperationObject
|
||||||
| undefined
|
|
||||||
| Pick<OpenAPIV3.TagObject, 'x-internal' | 'x-gitbook-ignore'>
|
|
||||||
| Pick<OpenAPIV3.OperationObject, 'x-internal' | 'x-gitbook-ignore'>
|
|
||||||
) {
|
) {
|
||||||
return data?.['x-internal'] === true || data?.['x-gitbook-ignore'] === true;
|
return data?.['x-internal'] === true || data?.['x-gitbook-ignore'] === true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user