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

Expose Packr flags + TypeScript fixes #137

Merged
merged 3 commits into from
Jun 14, 2024
Merged

Conversation

endel
Copy link
Contributor

@endel endel commented Jun 11, 2024

Hi there,

This PR exposes the following flags:

  • REUSE_BUFFER_MODE
  • RESET_BUFFER_MODE
  • RESERVE_START_SPACE

It also exposes these to TypeScript:

export class Packr extends Unpackr {
	// ...
	offset: number;
	useBuffer(buffer: Buffer): void;
	clearSharedData(): void;
}

Let me know if something's missing so I can improve this PR.

Thank you for the great work on this lib @kriszyp, cheers! 💙

@endel
Copy link
Contributor Author

endel commented Jun 11, 2024

Update: added the missing TypeScript types for the options argument of both .pack() and .unpack() methods: endel@7f77495

@endel
Copy link
Contributor Author

endel commented Jun 14, 2024

Update: exposed Packr.offset to TypeScript 🙌

@kriszyp kriszyp merged commit 0da484e into kriszyp:master Jun 14, 2024
@kriszyp
Copy link
Owner

kriszyp commented Jun 14, 2024

Thank you for the PR!

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