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

Fix the return types of *_BUILDER functions #2583

Merged
merged 2 commits into from
Oct 8, 2023

Conversation

Purrrpley
Copy link
Contributor

They actually return DomainModifier, not RecordModifier. This allows you to use them as arguments in D without type-checking reporting an error (because it's not an error, it's correct).

Fixes #2582.

Possibly related note: I noticed the SPF_BUILDER documentation page is broken. It doesn't display any content, and appears in the wrong section ("Record Modifiers" instead of "Domain Modifiers"), so it seems like the documentation is broken and hasn't updated the moving of the file properly, which is what I've done here but for more things, so they might break too...

I'm not sure how to fix that though, but it's probably a separate issue anyway, but still related so I'm noting it here before it breaks more things. I don't actually have much experience with much of this (I've never used Go or TypeScript before, and rarely use JavaScript), so I'm not 100% sure what I'm doing... but I think I did this properly, it's fixed in my testing.

Thank you. :)

They actually return `DomainModifier`, not `RecordModifier`. This allows you to use them as arguments in `D` without type-checking reporting an error (because it's not an error, it's correct).
cafferata added a commit to cafferata/dnscontrol that referenced this pull request Oct 8, 2023
@tlimoncelli
Copy link
Contributor

Thanks for noticing and fixing this!

@tlimoncelli tlimoncelli merged commit 7e79713 into StackExchange:master Oct 8, 2023
2 checks passed
cafferata added a commit to cafferata/dnscontrol that referenced this pull request Oct 9, 2023
@Purrrpley Purrrpley deleted the builder_return_type_fix branch October 9, 2023 10:17
cafferata added a commit to cafferata/dnscontrol that referenced this pull request Jan 11, 2024
cafferata added a commit to cafferata/dnscontrol that referenced this pull request Jan 11, 2024
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.

dnscontrol write-types generates incorrect return type for *_BUILDERs (except SPF_BUILDER)
2 participants