Closed sam-goodwin closed 1 year ago
Ah-ha! breakthrough, the projectionExpression
was not being const
:
export type GetCommand<
Item extends object,
PartitionKey extends keyof Item,
RangeKey extends keyof Item | undefined,
Format extends JsonFormat
> = new <
Key extends TableKey<Item, PartitionKey, RangeKey, Format>,
AttributesToGet extends keyof Item | undefined,
const ProjectionExpression extends string | undefined
>(
Specifically adding const
to the type:
const ProjectionExpression extends string | undefined
Have got it working for v3 Document type but it breaks for AttributeValue. Which is fine because I'm considering dropping support for both that and all of AWS SDK v2
Merging this so we at least have a working version for V3 AWS SDK.
TBH, I'm pretty tempted to re-write this package. It's way too complicated.
@sizuhiko this change is available at 0.2.4
. I think that as long as you use the TypeSafeDocument clients it will work.
This library needs a lot of love though. Types need to be completely re-written (simplified down) and it may be useful to add an actual client that is safe.
Perhaps integrate with my https://github.com/sam-goodwin/itty-aws. Type safe + "zero" bundle impact would be awesome
Still doesn't compile ... types need work.
I am considering:
Errors: