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

Resolve documentation signature mismatches #1993

Merged
merged 3 commits into from
Jan 29, 2025
Merged

Conversation

45930
Copy link
Contributor

@45930 45930 commented Jan 28, 2025

This PR resolves two classes of validation warnings from the typedoc build: signature mismatches, and not exported warnings.

Not exported warnings occur in a case like this:

type NotExported = {
  a: string;
  b: number;
}

// Warning: type NotExported, defined in ..., is referenced by Exported but is not included in the documentation
export class Exported implements NotExported {
   ...
 }

We make liberal use of this pattern, and I don't see a problem with continuing to do so. We would only respect this warning if we were committed to a 100% complete autogenerated o1js reference.

@45930 45930 requested review from a team as code owners January 28, 2025 16:48
@45930 45930 requested review from boray and ymekuria January 28, 2025 16:48
Copy link
Contributor

@ymekuria ymekuria left a comment

Choose a reason for hiding this comment

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

Nice! I just had a minor comment.

@@ -1039,7 +1039,6 @@ super.init();

/**
* Asynchronously fetches events emitted by this {@link SmartContract} and returns an array of events with their corresponding types.
* @async
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch.

@@ -836,7 +839,7 @@ class Field {
*
* **Important**: If the given `bytes` array is an array of `booleans` or {@link Bool} elements that all are `constant`, the resulting {@link Field} element will be a constant as well. Or else, if the given array is a mixture of constants and variables of {@link Bool} type, the resulting {@link Field} will be a variable as well.
*
* @param bytes - An array of {@link Bool} or `boolean` type.
* @param bits - An array of {@link Bool} or `boolean` type.
Copy link
Contributor

Choose a reason for hiding this comment

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

I see what you did here, but the doc comment above says "If the given bytes array is an array of ...". Should we make the comment and @param name consistent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good eye. Yeah, I updated bytes to bits in all cases. Bits seems like the correct word to use here.

@45930 45930 mentioned this pull request Jan 28, 2025
@45930 45930 merged commit c5bbf8b into main Jan 29, 2025
27 of 29 checks passed
@45930 45930 deleted the 2025-01-typdoc-errors-1 branch January 29, 2025 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants