Got this weird situation. Building for react native and using a native package from Intercom. Importing it works fine when android or ios. But for the web (or node jest) it throws an error.So have to do some face-pattern "hacking" like this
utilities/Intercom/index.ios.ts
export { default } from '@intercom/intercom-react-native'
utilities/Tntercom/index.web.ts
export default function Intercom() {}
// @ts-ignoreimport Intercom from '~/utilities/Intercom'
Not only does TS complain, but I also loses all types 😭
Is there any other way to do platform specific import and keep the native types?