Skip to content

fix: PLUGIN_DEFAULTS type in asyncStorage.ts #1558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JDMathew
Copy link

Please verify the following:

  • yarn build-and-test:local passes
  • I have added tests for any new features, if relevant
  • README.md (or relevant documentation) has been updated with your changes

Describe your PR

This PR fixes a type issue where ts thinks ignore is possibly undefined due to PLUGIN_DEFAULTS type being incorrect.

ignore has a fallback to a blank array if user has not defined it, however the compiler thinks the fallback is undefined due to explicit type AsyncStorageOptions.

const ignore = config.ignore || PLUGIN_DEFAULTS.ignore

Screenshot of issue in IDE
image

Fixes a type issue where ts thinks ignore is possibly undefined due to `PLUGIN_DEFAULTS` type being incorrect.
@JDMathew JDMathew changed the title fix PLUGIN_DEFAULTS type in asyncStorage.ts fix: PLUGIN_DEFAULTS type in asyncStorage.ts May 29, 2025
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.

1 participant