Skip to content

[RNE Rewrite] style(ts): rename opts to options - #1358

Merged
barhanc merged 2 commits into
rne-rewritefrom
@bh/rename-opts-to-options
Aug 10, 2026
Merged

[RNE Rewrite] style(ts): rename opts to options#1358
barhanc merged 2 commits into
rne-rewritefrom
@bh/rename-opts-to-options

Conversation

@barhanc

@barhanc barhanc commented Aug 10, 2026

Copy link
Copy Markdown
Member

Description

Changes naming from opts to options across the board in TS API. Follow-up to comment from #1317

Introduces a breaking change?

  • Yes
  • No

Type of change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation update (improves or adds clarity to existing documentation)
  • Other (chores, tests, code style improvements etc.)

Tested on

  • iOS
  • Android

Testing instructions

N/A

Screenshots

Related issues

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Additional notes

@barhanc barhanc self-assigned this Aug 10, 2026
@barhanc
barhanc requested a review from msluszniak August 10, 2026 10:49
@barhanc
barhanc merged commit 020e405 into rne-rewrite Aug 10, 2026
2 checks passed
@barhanc
barhanc deleted the @bh/rename-opts-to-options branch August 10, 2026 10:53
msluszniak added a commit that referenced this pull request Aug 12, 2026
Brings the OCR pipeline in line with the conventions that landed on
rne-rewrite while this branch was open.

- The three OCR-specific native ops were called straight off
  `rnexecutorchJsi.cv` from inside the task files. add-native-extension
  requires task-specific ops to be wrapped in
  `src/extensions/<domain>/utils/<name>.ts` and re-exported from the domain
  index, the way vadUtils/supertonicUtils/privacyFilterUtils are, so power
  users can reach them: new `cv/utils/ocrUtils.ts` with typed, documented
  `extractCraftTextBoxes` / `extractDbnetTextBoxes` / `ctcGreedyDecode`.
- Five bare `throw new Error` (geometry, detectors, documentModels, quad ops)
  now carry codes: INVALID_ARGUMENT for a caller's bad input, INVALID_STATE
  for calling table recognition on models loaded without a table config.
  Documented with `@throws` on the entry points that can raise them.
- `opts` parameters renamed to `options` (#1358): `makeCraftExtractBoxes`,
  `makeDbnetExtractBoxes`, `rectifyQuad`.
- `OcrModel.ocrOpts` -> `modelOpts`, matching every other task's model type.
- Tensor locals carry the `t` prefix the pipeline skill asks for.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants