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

Add mutable registry #899

Merged
merged 2 commits into from
Jun 21, 2024
Merged

Add mutable registry #899

merged 2 commits into from
Jun 21, 2024

Conversation

timostamm
Copy link
Member

This PR adds a mutable registry:

import { createMutableRegistry } from "@bufbuild/protobuf";
import { MyMessage } from "./gen/example_pb";

const registry = createMutableRegistry();

// Adds a message, enum, extension, or service type to the registry
registry.add(MyMessage);

Closes #679.

Similar functionality is added to v2 in #898.

To make sure we don't break anyone, let's remove the property.
@timostamm timostamm merged commit 5e0b35c into main Jun 21, 2024
5 checks passed
@timostamm timostamm deleted the tstamm/v1-mutable-registry branch June 21, 2024 14:06
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.

Expose add method on registry object
2 participants