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

types: More type defintions #178

Closed
wants to merge 3 commits into from

Conversation

alexander-alvarez
Copy link
Contributor

toJSON was actually wrong, which is worse than too generic types (i.e. any).

Type.equals method wasn't defined in the typings file

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.976% when pulling d6baff2 on alexander-alvarez:more-types into 8293a6b on mtth:master.

decode(buf: Buffer, pos?: number, resolver?: any): { value: any, offset: number};
encode(val: any, buf: Buffer, pos?: number): void;
equals(type: Type): boolean;
fingerprint(algorithm?: string): Buffer | string;
Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I can see fingerprint can return Buffers only

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Owner

Choose a reason for hiding this comment

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

Let's change it to just Buffer.

decode(buf: Buffer, pos?: number, resolver?: any): any;
encode(val: any, buf: Buffer, pos?: number): void;
fingerprint(algorithm?: any): any;
decode(buf: Buffer, pos?: number, resolver?: any): { value: any, offset: number};
Copy link
Contributor

Choose a reason for hiding this comment

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

Decode: Good catch, I added that to my pullrequest as well, hoping all of this gets committed faster to the project.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Feel free to pull anything in! I didn't even realize there was already a PR out with a lot of the changes -- nice work -- I've sort of slowly PR-ing bits as I've been coming across them.

I'll let @mtth merge as he see fits. (I prefer small uncontroversial PRs, so that there's higher velocity) but I'm more than happy to see these subset of changes get merged with your PR if everything checks out.

Copy link
Owner

Choose a reason for hiding this comment

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

I'm OK either way. If @reuzel doesn't mind updating #175, I can merge this once fingerprint's signature is changed; let me know what you prefer.

Copy link
Contributor

Choose a reason for hiding this comment

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

done

reuzel added a commit to reuzel/avsc that referenced this pull request May 16, 2018
Update based on pull request mtth/avsc mtth#178
@mtth
Copy link
Owner

mtth commented Jun 5, 2018

@alexander-alvarez - are there still changes from this PR you wanted to merge or is this covered by #175?

@alexander-alvarez
Copy link
Contributor Author

nope they're incorporated 👍

@alexander-alvarez alexander-alvarez deleted the more-types branch June 5, 2018 04:27
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.

None yet

4 participants