I am writing a reac-native app, created from the typescript template. When I create a file for types, lets call it fragmentTypes.d.ts
and try to import it using the standard import {MyType} from './fragmentTypes'
I get an error saying
error: Error: Unable to resolve module `./fragmentTypes` from `src\Pages\Login\Fragments\index.ts`:None of these files exist: * src\Pages\Login\Fragments\fragmentTypes(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx) * src\Pages\Login\Fragments\fragmentTypes\index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
It works when I try and import fragmentTypes.d
, but obviously that isn't the best solution. How do I change what file types its looking for and add d.ts?