Skip to content

SettingsMigrationComponentConstructorParams.contract?

SettingsMigrationComponentConstructorParams › contract?

Type: PluginApiContract

The contract this plugin expects of the provider, which wins over the provider's own when supplied.

Worth supplying, and worth keeping NARROW. A migration usually needs one method that has existed since the provider's first contract version, while the same plugin may read other parts of that API through a much newer one. Declaring the wider expectation here would refuse to offer the migration to a user on an older provider — which is precisely the user who still has settings to migrate.