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

typescript: type definition for UserRecord.data says Buffer, but actual property is a string #89

Open
cbchenoweth opened this issue Apr 16, 2020 · 1 comment

Comments

@cbchenoweth
Copy link

Title pretty much says it all, the type definitions for the returned UserRecord are incorrect.

Here we can see they define the data property as a Buffer:
https://github.com/awslabs/kinesis-aggregation/blob/master/node/index.d.ts#L9

But in the actual code, it does not return data as a Buffer, but a base64 string:
https://github.com/awslabs/kinesis-aggregation/blob/master/node/lib/kpl-deagg.js#L97

We can see the example code showing that it is expecting a string object here:
https://github.com/awslabs/kinesis-aggregation/blob/master/node/example/sample-deaggregation.js#L141


Not sure which is the "correct" way, but I imagine the types should just be updated to reflect the actual code. (to prevent breaking change to existing consumer code)

@stevegoossens
Copy link
Contributor

This appears to have been fixed in #107

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

No branches or pull requests

2 participants