galex
04/06/2020, 4:41 PMexport namespace mySdk {
type Nullable<T> = T | null | undefined
namespace com.mySdk.core.feature.login.repository {
interface EnterEmailBaseRepository extends com.mySdk.core.repository.BaseRepository {
emailExists(email: string, block: (p0: boolean) => void): void
}
}
}
How do I access this class in a React app? I tried a few things, the closest is the following:
import * as mySdk from 'mySdk';
Somewhere in a React.Component
class:
console.log(mySdk); // prints an object with the 'package' inside as attributes
But the following line to access the package fails:
console.log(<http://mySdk.com|mySdk.com>.mySdk.core.feature.login.repository.EnterEmailRepository);
Error:
// -> Property 'com' does not exist on type 'typeof import(...)
What am I doing wrong here?