woltsu / tsynamo

Type-friendly TypeScript DynamoDB query builder!
MIT License
31 stars 6 forks source link

add support for tuples in attributes #9

Closed mindler-sasu closed 6 months ago

mindler-sasu commented 6 months ago

Allows only to select elements of the tuple type

mindler-sasu commented 6 months ago

The typing is actually nto correct yet. Trying to solve it.

type a = ObjectFullPaths<{ tuple: [{ bar: "beer" }, { beer: "karhu" }] }>;
// "tuple" | "tuple[0]" | "tuple[1]" | "tuple[0].beer" | "tuple[0].bar" | "tuple[1].beer" | "tuple[1].bar"

should be

// "tuple" | "tuple[0]" | "tuple[1]" | "tuple[0].bar" | "tuple[1].beer"
mindler-sasu commented 6 months ago

Now works correctly