Skip to content

fix(core): type FragmentsManager.init options as FragmentsModelsOptions - #835

Merged
agviegas merged 1 commit into
ThatOpen:mainfrom
zzoraemon043:fix/fragments-init-options
Oct 19, 2026
Merged

agviegas merged 1 commit into
ThatOpen:mainfrom
zzoraemon043:fix/fragments-init-options

Conversation

@zzoraemon043

Copy link
Copy Markdown
Contributor

Description

Fixes #834

FragmentsManager.init passes options straight to new FragmentsModels(workerURL, options), but typed it as { classicWorker?: boolean }, so maxWorkers and threadGroups needed a cast. It now uses FRAGS.FragmentsModelsOptions, which @thatopen/fragments 3.4.7 (the version in the lockfile) exports with classicWorker, maxWorkers and threadGroups.

Additional context

Checked with tsc --noEmit -p tsconfig-build.json in packages/core: it passes, and a scratch file calling init(url, { maxWorkers: 4, threadGroups: { data: 1 } }) compiles with the change and fails with TS2353 without it. I did not add a test since the change is type-only.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following:

  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Follow the Conventional Commits v1.0.0 standard for PR naming (e.g. feat(examples): add hello-world example).
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@agviegas
agviegas merged commit 34c458b into ThatOpen:main Oct 19, 2026
@agviegas

Copy link
Copy Markdown
Contributor

Merged, thank you.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FragmentsManager.init: options is typed { classicWorker?: boolean }, so maxWorkers / threadGroups don't typecheck

2 participants