arantes555 / electron-fetch

A light-weight module that brings window.fetch to the background process of Electron
Other
133 stars 21 forks source link

Typescript typings are not accurate #6

Closed MacroChip closed 6 years ago

MacroChip commented 6 years ago

The namespace fetch is exported instead of the function fetch

scottrippey commented 6 years ago

I am also having this problem ... I get the following error:

import fetch from 'electron-fetch';
// TS Error:
// TS1192: Module '"./node_modules/electron-fetch/lib/index"' has no default export.

I think export = fetch; needs to be changed to export default fetch; I will create a PR!

Anrock commented 6 years ago

Given the current state of things - is there a way to properly import fetch at all? Everything i've tried gives me "fetch is not a function".

arantes555 commented 6 years ago

Should be fixed in 1.3.0