dynamodb-toolbox icon indicating copy to clipboard operation
dynamodb-toolbox copied to clipboard

Compile error - Type alias 'ParsedEntity' circularly references itself.

Open kr1p70n1c opened this issue 2 years ago • 1 comments

  • Typescript: 4.7.4
  • DynamoDB Toolbox: 0.4.2
node_modules/dynamodb-toolbox/dist/lib/parseEntity.d.ts:24:21 - error TS2456: Type alias 'ParsedEntity' circularly references itself.

24 export declare type ParsedEntity = ReturnType<typeof parseEntity>;
                       ~~~~~~~~~~~~

Found 1 error in node_modules/dynamodb-toolbox/dist/lib/parseEntity.d.ts:24

When downgrading to DynamoDB Toolbox 0.3.5 again, all is 👍!

kr1p70n1c avatar Jul 05 '22 11:07 kr1p70n1c

I tried the latest version again, and this still persists.

  • DynamoDB Toolbox: 0.4.3
  • macos: 10.15.7
  • TypeScript: 4.7.4
  • node: 16.16.0
  • npm: 8.11.0

Do note that runtime the library does work when I massage my data modelling (access patterns) with command line scripts invoking TS files via ts-node.

The compile error kicks in when I run tsc for my project.

My tsconfig.js as follows:

{
    "compilerOptions": {
        "experimentalDecorators": true,
        "lib": ["es2017"],
        "moduleResolution": "node",
        "noImplicitAny": true,
        "strictNullChecks": true,
        "removeComments": true,
        "noUnusedLocals": true,
        "noUnusedParameters": true,
        "sourceMap": true,
        "esModuleInterop": true,
        "resolveJsonModule": true,
        "target": "es2017",
        "module": "commonjs",
        "outDir": "dist",
        "typeRoots": [ "./custom-types", "./node_modules/@types"]
    },
    "exclude": [
        "node_modules"
    ]
}

kr1p70n1c avatar Jul 23 '22 10:07 kr1p70n1c

@ThomasAribart, will you have time to look into this?

naorpeled avatar Aug 17 '22 14:08 naorpeled

Still getting this with

$ tsc -v && yarn -v && node -v
Version 4.5.5
1.22.19
v16.15.1

ConjunctiveNormalForm avatar Oct 27 '22 23:10 ConjunctiveNormalForm

Still getting this with

$ tsc -v && yarn -v && node -v
Version 4.5.5
1.22.19
v16.15.1

Hey, looked into it and it seems the fix for this wasn't released yet, we're releasing the next version today hopefully

naorpeled avatar Oct 28 '22 06:10 naorpeled

Yay, this is now fixed with the latest 0.5.0 release 🍾

kr1p70n1c avatar Nov 10 '22 08:11 kr1p70n1c

Yay, this is now fixed with the latest 0.5.0 release 🍾

Wooho!😎

naorpeled avatar Nov 10 '22 08:11 naorpeled