chiefbiiko / dynamodb

deno <3 dynamodb
MIT License
25 stars 11 forks source link

Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type' #28

Open helloworldless opened 2 years ago

helloworldless commented 2 years ago

It looks like since Deno 1.5, there was a breaking change which is causing an issue. I'm running Deno 1.17.2 and seeing this error:

error: TS1205 [ERROR]: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.
export { Doc } from "./util.ts";
         ~~~
    at https://denopkg.com/chiefbiiko/dynamodb@v1.0.0/mod.ts:5:10

TS1205 [ERROR]: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.
export { HeadersConfig, createHeaders } from "./create_headers.ts";
         ~~~~~~~~~~~~~
    at https://denopkg.com/chiefbiiko/dynamodb@v1.0.0/client/mod.ts:4:10

Found 2 errors.

I found some solutions saying to create a tsconfig.json like this:

{
  "compilerOptions": {
    "isolatedModules": false,
  }
}

... but it did not solve the issue.

A bit more research turned up this saying that isolatedModules cannot be disabled: https://github.com/denoland/deno/issues/12599

Alxblsk commented 2 years ago

@chiefbiiko I've created a tiny PR to address this issue. Would be great if you can take a look.