i am trying to import a ReactCrop component from ReactCrop package.
it's index.d.ts file is as follows
export as namespace ReactCrop;
declare namespace ReactCrop {
interface Crop {
}
//other interfaces....
}
declare class ReactCrop extends Component<ReactCrop.ReactCropProps> {
.....
}
export = ReactCrop;
i checked the typescript manual about declaration merging, it says, when merging a class and namespace, the namespace has to export the class. like below
class Album {
label: Album.AlbumLabel;
}
namespace Album {
export class AlbumLabel { }
}
But the ReactCrop type definition, does not export the ReactCrop class.
So how can i import the Component when the same name "ReactCrop" is an alias for Class and Namespace?