Closed sarahdayan closed 3 years ago
This actually will not work. There is no default export to the .index.d.ts file so the syntax you're suggesting won't function.
With ES6 it is much simpler to initialize this library:
import 'jest-fetch-mock'
fetchMock.enableMocks()
This updates the TypeScript install section of the README with ES imports instead of CommonJS
require
. This is especially useful for stricter ESLint configurations that enforce ES imports.