Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6295

Unable to import typescript module

$
0
0

As soon as I'm importing Driver interface from api/event module I get an error: Cannot find module '@api/driver' when i try to import it.

import { Driver } from "@api/event";declare module '@api/driver' {  interface GetDriversResponse {    drivers: Driver[];  }}

The error is fixed as soon as I remove the import statement.

Here is how many api/event module looks

declare module '@api/event' {  interface Driver {    name: string;    id: number;    org: string;  }}

Do I need to change something in the ts config?


Viewing all articles
Browse latest Browse all 6295

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>