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

[util-dynamodb]: use recursive conditional type to support better type inferrence. #1564

Closed
AllanZhengYP opened this issue Oct 12, 2020 · 2 comments
Labels
closed-for-staleness feature-request New feature or enhancement. May require GitHub community feedback.

Comments

@AllanZhengYP
Copy link
Contributor

AllanZhengYP commented Oct 12, 2020

Is your feature request related to a problem? Please describe.
Currently, the result type to the unmarshall() is staticly defined. With the new features(recursive conditional type, variadic type type) to be avalable in TypeScript v4.1, we can achieve more fine-grained type according to the users input.

Describe the solution you'd like
Essentially, with the new features in TS 4.1, we can convert the input types in TS types, and even provide informative error messages at compile time. Here's the type example in playground: link.

The type is not fully tested yet but it should give the idea.

@AllanZhengYP AllanZhengYP added the feature-request New feature or enhancement. May require GitHub community feedback. label Oct 12, 2020
@github-actions
Copy link

Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Oct 13, 2021
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
closed-for-staleness feature-request New feature or enhancement. May require GitHub community feedback.
Projects
None yet
Development

No branches or pull requests

1 participant