One way of doing it, which is a bit annoying, is creating a declaration file with the same name.
component
- component.d.ts <---
- component.android.tsx
- component.ios.tsx
then
import { file } from "../group/file";
Update:
Another way of doing it is just omit the extension for one of them, then typescript will pick up the default one.
- component.tsx
- component.android.tsx
Android will pick up the specific android file, and iOS will default to normal one.