Recently, I encountered an issue while using the URLSearchParams.size in my code. To my surprise, it didn't work on Safari as expected. Checking MDN's browser compatibility table revealed that Safari version 16.6 does not support this feature, unlike the newer Safari 17 with a green tick.
Adapting to this limitation was simple, but it got me thinking - how many other APIs am I unknowingly using that aren't supported across different browsers? As a TypeScript user, I wish there was a way to receive warnings from TS or tools like eslint and Copilot when using unsupported APIs instead of having to rely on extensive integration testing across various browsers.
Is there a method to prompt TS or eslint to flag any unsupported API calls based on specific browser versions to avoid such compatibility issues?