Removing declare module "connect-dynamodb" fixes the typescript compilation
$ node -v
v18.16.0
$ tsc -v
Version 5.0.4
$ tsc --project tsconfig-build.json
node_modules/connect-dynamodb/index.d.ts:10:3 - error TS2666: Exports and export assignments are not permitted in module augmentations.
10 export = ConnectDynamoDB;
~~~~~~
Found 1 error in node_modules/connect-dynamodb/index.d.ts:10
Removing
declare module "connect-dynamodb"
fixes the typescript compilation