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

Allow unset data in DescriptorDataBuilder #66

Open
ohager opened this issue Aug 25, 2023 · 0 comments
Open

Allow unset data in DescriptorDataBuilder #66

ohager opened this issue Aug 25, 2023 · 0 comments
Labels
enhancement New feature or request standards The standards module

Comments

@ohager
Copy link
Member

ohager commented Aug 25, 2023

Is your feature request related to a problem? Please describe.
In a current scenario I need to remove certain elements from the SRC44 Databuilder.

        const oldData = DescriptorData.parse(ledgerAlias.aliasURI, false);
        builder = DescriptorDataBuilder.createWith(oldData);
        // @ts-ignore
        builder.setAlias(undefined)

I needed to ignore Typescript check, when removing alias reference.

Describe the solution you'd like
It could be possible to allow undefined values, but for better readability I recommend to introduce something like unset

        const oldData = DescriptorData.parse(ledgerAlias.aliasURI, false);
        builder = DescriptorDataBuilder.createWith(oldData);
        builder.unsetAlias()
@ohager ohager added enhancement New feature or request standards The standards module labels Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request standards The standards module
Projects
None yet
Development

No branches or pull requests

1 participant