sam-goodwin / typesafe-dynamodb

TypeSafe type definitions for the AWS DynamoDB API
Apache License 2.0
205 stars 11 forks source link

Compilation errors in test/v3-document.test.ts #57

Closed obazoud closed 2 months ago

obazoud commented 4 months ago

Hello,

I just clone the project, open it in vscode and run pnpm install.

I got a lot of compilation errors in test/v3-document.test.ts in vscode

Property 'Item' does not exist on type 'ServiceOutputTypes'.
   Property 'Item' does not exist on type 'BatchExecuteStatementCommandOutput'.ts(2339)

Same errors in command line:

pnpm run test
....
 FAIL  test/v3-document.test.ts
  ● Test suite failed to run

    test/v3-document.test.ts:53:7 - error TS2339: Property 'Item' does not exist on type 'ServiceOutputTypes'.
      Property 'Item' does not exist on type 'BatchExecuteStatementCommandOutput'.

    53   get.Item?.key;
             ~~~~
    test/v3-document.test.ts:79:7 - error TS2339: Property 'Attributes' does not exist on type 'ServiceOutputTypes'.
      Property 'Attributes' does not exist on type 'BatchExecuteStatementCommandOutput'.

    79   put.Attributes?.key;
             ~~~~~~~~~~
    test/v3-document.test.ts:101:7 - error TS2339: Property 'Attributes' does not exist on type 'ServiceOutputTypes'.
      Property 'Attributes' does not exist on type 'BatchExecuteStatementCommandOutput'.

    101   del.Attributes?.key;
              ~~~~~~~~~~
    test/v3-document.test.ts:126:9 - error TS2339: Property 'Items' does not exist on type 'ServiceOutputTypes'.
      Property 'Items' does not exist on type 'BatchExecuteStatementCommandOutput'.

    126   query.Items?.[0].key;
                ~~~~~
    test/v3-document.test.ts:189:16 - error TS2339: Property 'Attributes' does not exist on type 'ServiceOutputTypes'.
      Property 'Attributes' does not exist on type 'BatchExecuteStatementCommandOutput'.

    189   returnAllNew.Attributes?.key?.length;
                       ~~~~~~~~~~
    test/v3-document.test.ts:202:16 - error TS2339: Property 'Attributes' does not exist on type 'ServiceOutputTypes'.
      Property 'Attributes' does not exist on type 'BatchExecuteStatementCommandOutput'.

    202   returnAllOld.Attributes?.key?.length;
                       ~~~~~~~~~~
    test/v3-document.test.ts:215:20 - error TS2339: Property 'Attributes' does not exist on type 'ServiceOutputTypes'.
      Property 'Attributes' does not exist on type 'BatchExecuteStatementCommandOutput'.

    215   returnUpdatedNew.Attributes?.key?.length;
                           ~~~~~~~~~~
    test/v3-document.test.ts:228:20 - error TS2339: Property 'Attributes' does not exist on type 'ServiceOutputTypes'.
      Property 'Attributes' does not exist on type 'BatchExecuteStatementCommandOutput'.

    228   returnUpdatedOld.Attributes?.key?.length;
                           ~~~~~~~~~~
sam-goodwin commented 4 months ago

Hm, maybe a change in TypeScript has broken this library: https://github.com/sam-goodwin/typesafe-dynamodb/blob/058628b9abd773a1aca195d26d99eeb0c66daaed/package.json#L41

typesafe-dynamodb deserves a v2 😅

github-actions[bot] commented 2 months ago

This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the "backlog" label.

github-actions[bot] commented 2 months ago

Closing this issue as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen. If you wish to exclude this issue from being marked as stale, add the "backlog" label.