-
Notifications
You must be signed in to change notification settings - Fork 114
Description
Describe the bug
When I try to build my code using typescript it won't compile. I try building using "tsc -p tsconfig.json". On Typescript v4 the error I receive is "JSDoc types can only be used inside documentation comments." and in Typescript v5 the error is "'?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'boolean'?"
The error is occurring in node_modules/dynamodb-onetable/dist/mjs/Table.d.ts:100:29
To Reproduce
I created this repo to reproduce the bug. https://github.com/melissarh57/dynamodb-onetable-error/blob/main/README.md
when running the command npm run build these are the output logs
`
[email protected] build
tsc -p tsconfig.json
node_modules/dynamodb-onetable/dist/mjs/Table.d.ts:17:30 - error TS2307: Cannot find module 'aws-lambda' or its corresponding type declarations.
17 import {DynamoDBRecord} from 'aws-lambda'
~~~~~~~~~~~~
node_modules/dynamodb-onetable/dist/mjs/Table.d.ts:100:29 - error TS8020: JSDoc types can only be used inside documentation comments.
100 options?: {nothrow: ?boolean}
~~~~~~~~
Found 2 errors in the same file, starting at: node_modules/dynamodb-onetable/dist/mjs/Table.d.ts:17
`
Steps to reproduce the behavior:
- Clone the repo listed above.
- run 'npm run build'
- see error log in console.
Expected behavior
Can import Table and compile via typescript without errors
Environment (please complete the following information):
- Node Version 16
- OneTable Version: 2.6.3
- TypeScript Version: 5.1.6 using "strict"
Additional context
Please let me know if I missed any important info
