I'd assume https://www.mediawiki.org/wiki/Deprecation_policy#Removal applies: "Code MUST emit hard deprecation notices for at least one major MediaWiki version before being removed."
Formally, this policy only applies to PHP code. The Scope section says: "This proposed policy applies to the PHP API of the MediaWiki core (mediawiki/core.git) codebase. It explicitly does not apply to the api.php API, client-side JavaScript, HTML output, or database schemas."
I don't know if we even have a policy for the removal of JS modules. It would certainly be a good idea to have one, so we don't randomly break custom JS code...