Try this:

export { Modal, ModalGateway };
export default Carousel;


Since I haven't found any solution anywhere, I would like to share my solution. The key is to create an interface with default anonymous method and export a variable instance of this interface.



interface GeoTz {
     * Get TZ ids for lat/lon. It can throw an exception if coordinates are invalid.
     * @param lat Latitude
     * @param lon Longitude
     * @returns TZ ids for coordinates, e.g. ['Asia/Shanghai', 'Asia/Urumqi']
     * @throws An exception if coordinates are invalid
    (lat: string | number, lon: string | number): string[];

     * Can change the cache behavior, such as preload everything into memory or use custom get/set store functions
     * @param opts Custom options for cache
    setCache(opts: {
        preload?: boolean;
        store?: {
            get: (key: string) => import('geojson').GeoJSON;
            set: (key: string, data: import('geojson').GeoJSON) => void;
    }): void;

declare module 'geo-tz' {
    const geoTz: GeoTz;
    export = geoTz;

Then in code both works:

import geoTz from 'geo-tz';

geoTz.setCache({ preload: true });
geoTz('49.000', '14.000');

Related Query

More Query from same tag