fix(capacitor): use proper types for capacitor v7 support #30228
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue number: resolves internal
What is the current behavior?
Currently, Capacitor types are outdated in Ionic Framework and we're accessing a type property that no longer exists in Capacitor 7.0.0+
What is the new behavior?
This PR updates the capacitor version and addresses removal of
.Plugins
from@capacitor/core
'sCapacitorGlobal
, which we rely on to dynamically access plugins that the user may or may not have installed.The fix for this was creating a custom type definition to support accessing
Plugins
. WhilePlugins
was removed from Capacitor if we were accessing it directly from core, we're pulling it from the window in the browser, where it's still exposed, so we just needed to make our type reflect that.Does this introduce a breaking change?
Other information
Technically, this issue does not prevent Framework from working with Capacitor 7 because it's only a typing issue, but it's still a minor issue that should be addressed in our effort to support Capacitor 7. This PR, along with #30195, should make it ready for that.