I wish to access the Effective connection type in the navigator.
const effectiveConnectionType = navigator.connection?.effectiveType ?? 'n/a'
But typescript tells me that
Property 'effectiveType' does not exist on type 'NetworkInformation',
I'm guessing that it is because
effectiveType is not fully supported. I would hope that it would have been optional declared (
effectiveType?: 'slow-2g' | '2g' | '3g' | '4g') by typescript, but it has not.
I'm seeking good recommendation(s) on how to deal with this?