slorber / awesome-debounce-promise

Debounce your API calls easily and stay in promised land.
https://sebastienlorber.com
391 stars 9 forks source link

Build fails with empty tsconfig.json #14

Closed FauxFaux closed 5 years ago

FauxFaux commented 5 years ago

For my project, and for a minimal tsconfig.json, the build fails inside @types/debounce-promise.

Testcase: https://github.com/FauxFaux/testcase-a-d-p

tsconfig.json

{
  "include": [
    "./src/*"
  ]
}
% npm run build
> adp@1.0.0 build /var/tmp/faux190502.licence
> tsc

node_modules/awesome-debounce-promise/dist/index.d.ts:1:8 - error TS1192: Module '"/var/tmp/faux190502.licence/node_modules/@types/debounce-promise/ts3.1/index"' has no default export.

1 import DebouncePromise from 'debounce-promise';
         ~~~~~~~~~~~~~~~

Found 1 error.

I do not understand what @types/debounce-promise is doing, so can't really help.

slorber commented 5 years ago

Hi,

I'm not a TS expert but it works with this minimal config so I'll add it to readme

{
  "include": ["./src/**/*"],
  "compilerOptions": {
    "esModuleInterop": true
  }
}

Thanks for creating a repro and using my lib ;)