Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Conversation

@CorentinTh
Copy link
Member

No description provided.

@CorentinTh CorentinTh requested a review from Copilot June 29, 2025 14:07
@CorentinTh CorentinTh self-assigned this Jun 29, 2025
@CorentinTh CorentinTh enabled auto-merge (squash) June 29, 2025 14:07
@CorentinTh CorentinTh disabled auto-merge June 29, 2025 14:07
@CorentinTh CorentinTh enabled auto-merge (squash) June 29, 2025 14:08
@CorentinTh CorentinTh merged commit 2a8b88e into main Jun 29, 2025
1 check passed
@CorentinTh CorentinTh deleted the config-arg branch June 29, 2025 14:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the extraction use cases to allow passing a partial configuration through high-order wrapper methods.

  • Updated extractText to accept PartialExtractorConfig instead of the full config type.
  • Added an optional config parameter to extractTextFromBlob and extractTextFromFile.
  • Forwarded the new config through each call chain.
Comments suppressed due to low confidence (3)

src/extractors.usecases.ts:36

  • Add JSDoc explaining the config parameter, its accepted fields, and the default behavior when it's omitted.
export async function extractTextFromBlob({ blob, config }: { blob: Blob; config?: PartialExtractorConfig }) {

src/extractors.usecases.ts:43

  • Add JSDoc for the config parameter in this wrapper to clarify how file-based extraction uses the provided settings.
export async function extractTextFromFile({ file, config }: { file: File; config?: PartialExtractorConfig }) {

src/extractors.usecases.ts:40

  • Add unit tests to verify that custom config values are correctly passed from extractTextFromBlob (and extractTextFromFile) to extractText.
  return extractText({ arrayBuffer, mimeType, config });

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants