Skip to content

Commit a941c3d

Browse files
authored
fix(types/http): use import * as http(s) (#308)
Fixes "Module '"http"' has no default export" #307 Signed-off-by: Haili Zhang <[email protected]>
1 parent c6bd3fa commit a941c3d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/types/http/IRequest.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
1111
limitations under the License.
1212
*/
1313

14-
import http from "http";
15-
import Restana from "restana";
14+
import * as http from 'http';
15+
import Restana from 'restana';
1616

17-
export default interface IRequest extends http.IncomingMessage, Restana.RequestExtensions { }
17+
export default interface IRequest extends http.IncomingMessage, Restana.RequestExtensions {}

src/types/http/IResponse.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
1111
limitations under the License.
1212
*/
1313

14-
import http from "http";
15-
import Restana from "restana";
14+
import * as http from 'http';
15+
import Restana from 'restana';
1616

17-
export default interface IResponse extends http.ServerResponse, Restana.ResponseExtensions { }
17+
export default interface IResponse extends http.ServerResponse, Restana.ResponseExtensions {}

src/types/http/THTTPExecuteParams.type.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ See the License for the specific language governing permissions and
1111
limitations under the License.
1212
*/
1313

14-
import http from "http";
15-
import https from "https";
14+
import * as http from 'http';
15+
import * as https from 'https';
1616

1717
export type THTTPExecuteParams = {
1818
body?: string;
1919
headers?: { [key: string]: any };
2020
method: string;
2121
agent?: http.Agent | https.Agent;
22-
}
22+
};

0 commit comments

Comments
 (0)