sam-goodwin / typesafe-dynamodb

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

Incorrect type inference when table partition key is a number #39

Closed brendo-m closed 2 years ago

brendo-m commented 2 years ago

To repro:

const table = new Table<{ id: number }, "id">(
  new aws_dynamodb.Table(stack, "table", {
    partitionKey: {
      name: "id",
      type: aws_dynamodb.AttributeType.NUMBER,
    },
  })
);

const item = table.getItem({ id: "123" }); // item inferred to be `never`
github-actions[bot] commented 2 years 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 years 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.

github-actions[bot] commented 2 years 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.