-
Notifications
You must be signed in to change notification settings - Fork 586
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
feat(codegen): add serde helper function #4616
Conversation
Would this account for the use of |
39eaca9
to
f425644
Compare
Yes, this should migrate over with its module when that happens.
It should handle name differences between the source and target. const source = {
succinct: 'value 1',
VERBOSE: 'value 2'
};
const result = take(source, {
succinct: [], // default instruction
verbose: [_ => _ === 'value 2', _ => _ + ' append this', 'VERBOSE'] // verbose instruction
});
result == {
succinct: 'value 1',
verbose: 'value 2 append this'
} The instruction is a triplet of |
bfae917
to
adb2d2f
Compare
Applying this for example to Lambda's client, the before/after
Example diff: #4620 |
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. |
Issue
n/a
Description
This adds a serde helper called
take
. The anticipated usage is as follows:current:
new:
The use of tuples as instructions (essentially arguments) is for consistency in reading positional values, and brevity.
the default form can be reduced from
[void 0, void 0, void 0]
to[,,]
and further to[]
, which is shorter thanvoid 0
.Testing
existing and new unit tests