Skip to content

docs: clarify ResourceFetcher class docstring#1087

Open
msluszniak wants to merge 1 commit intomainfrom
docs/resource-fetcher-class-docstring
Open

docs: clarify ResourceFetcher class docstring#1087
msluszniak wants to merge 1 commit intomainfrom
docs/resource-fetcher-class-docstring

Conversation

@msluszniak
Copy link
Copy Markdown
Member

@msluszniak msluszniak commented Apr 22, 2026

Summary

Both the file-level docstring and the ResourceFetcher class docstring listed pauseFetching, resumeFetching, cancelFetching, getFilesTotalSize, listDownloadedFiles, listDownloadedModels, and deleteResources as if they were available on the class. They aren't — those methods only exist on the concrete adapter implementations (ExpoResourceFetcher, BareResourceFetcher).

This PR rewrites both docstrings to:

  • Describe ResourceFetcher as a static-only entry point that delegates to a configured ResourceFetcherAdapter.
  • Direct readers to the adapter packages when they want storage-management utilities.

Pure docs change — no behavior change.

Issue

Addresses item 4 of #1086.

Test plan

  • yarn typecheck passes
  • npx eslint packages/react-native-executorch/src/utils/ResourceFetcher.ts clean
  • npx prettier --check packages/react-native-executorch/src/utils/ResourceFetcher.ts clean
  • No source changes — only the file-level and class-level JSDoc blocks were modified

The file-level and class-level docstrings listed pauseFetching,
resumeFetching, cancelFetching, getFilesTotalSize, listDownloadedFiles,
listDownloadedModels, and deleteResources as available on
ResourceFetcher. Those methods only exist on the concrete adapter
implementations (ExpoResourceFetcher, BareResourceFetcher).

Rewrite both docstrings to describe ResourceFetcher as the static
entry point that delegates to a configured adapter, and direct
readers to the adapter packages when they want the storage-management
utilities.

Refs #1086 (item 4).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@msluszniak msluszniak self-assigned this Apr 22, 2026
@msluszniak msluszniak added the documentation Improvements or additions to documentation label Apr 22, 2026
@msluszniak msluszniak requested a review from chmjkb April 22, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant