Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 #8

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open

V2 #8

wants to merge 30 commits into from

Conversation

kyeotic
Copy link

@kyeotic kyeotic commented Feb 16, 2021

Complete re-write using Typescript and the AWS SDK v3 DynamoDB Client. Attempts to retain the same API, but the result is no longer a modified dynamo client, it's a butter client that only exposes the "document client" methods.

Copy link

@calebjeffrey calebjeffrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine from a typescript perspective. Some might argue that main.ts or marshalling.ts could be renamed to typings.ts because the content but the file name choice isn't important so meh

type definitions look good to me 👍 10/10 would approve

@kyeotic
Copy link
Author

kyeotic commented Feb 16, 2021

@calebjeffrey Thank you 😄

Do you know if there is there a way to control the declaration outputs? The only option I can find is declarationDir, but that just nests the same files under an output directory.

I'd like to keep the types in their respective source files, rather than extracting them into a types.ts. I think they make more sense next to the code that uses them.

Edit: I just realized you aren't talking about the output/built files. Ignore the above. main.ts is the public/package exports. This is a JavaScript habit to make sure that you can import everything from the main package name, e.g. import { up} from 'dynamo-butter, without exposing exports only intended for other source modules. If there is another way to control this behavior in Typescript I would love to learn it.

marshalling.ts does have some actual code in it. I think the types its pulling in belong there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants