Skip to content

Commit

Permalink
[types] - fix: ensure non-optional string for content type check
Browse files Browse the repository at this point in the history
 - Removed unnecessary optionality of the `contentType` parameter in `isTextExtractionSupportedContentType` function
 - Enforce the function to always receive a string argument, aligning with supported content types check
  • Loading branch information
Jules authored and Jules committed Jul 25, 2024
1 parent 7d56e68 commit 0a59332
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/src/shared/text_extraction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export class TextExtraction {
}

export function isTextExtractionSupportedContentType(
contentType: string | undefined
contentType: string
): contentType is SupportedContentTypes {
return supportedContentTypes.includes(contentType as SupportedContentTypes);
}

0 comments on commit 0a59332

Please sign in to comment.