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

docs: jsdoc return statement update #1330

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

DhairyaMajmudar
Copy link
Contributor

Description

Updating return statements of functions generateFromString, generateFromURL and generateFromFile by adding type TemplateRenderResult | undefined

Related issue(s)

Fixes: #507

Screenshot of markdown rendered on website:

Before After
image Screenshot from 2025-01-11 14-30-34

cc: @derberg @ItshMoh

Copy link

changeset-bot bot commented Jan 11, 2025

⚠️ No Changeset found

Latest commit: edcd1fc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@DhairyaMajmudar DhairyaMajmudar changed the title Fix(#507): jsdocs return statment updation with type TemplateRenderRe… Fix: jsdocs return statment updation with type TemplateRenderRe… Jan 11, 2025
@DhairyaMajmudar DhairyaMajmudar changed the title Fix: jsdocs return statment updation with type TemplateRenderRe… fix: jsdocs return statment updation with type TemplateRenderRe… Jan 11, 2025
@DhairyaMajmudar DhairyaMajmudar changed the title fix: jsdocs return statment updation with type TemplateRenderRe… Fix: jsdocs return statement updation with type TemplateRenderRe… Jan 11, 2025
@DhairyaMajmudar DhairyaMajmudar changed the title Fix: jsdocs return statement updation with type TemplateRenderRe… Fix: jsdocs return statement updation Jan 11, 2025
@DhairyaMajmudar DhairyaMajmudar changed the title Fix: jsdocs return statement updation fix: jsdocs return statement updation Jan 11, 2025
Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

that was fast

can you specify why you didn't add these https://github.com/asyncapi/generator/pull/967/files#diff-ccc178369ef3ad89acc2592970d94838d2dc83c38731610f3675be2ee3e6f99aR216-R226. How can I learn from JSDoc the structure of TemplateRenderResult if this is not provided? or maybe should the type be imported from react sdk dependency?

@DhairyaMajmudar
Copy link
Contributor Author

that was fast

Hehe Thank you : )

can you specify why you didn't add these https://github.com/asyncapi/generator/pull/967/files#diff-ccc178369ef3ad89acc2592970d94838d2dc83c38731610f3675be2ee3e6f99aR216-R226. How can I learn from JSDoc the structure of TemplateRenderResult if this is not provided? or maybe should the type be imported from react sdk dependency?

We don't need to import or declare the type TemplateRenderResult within JSdocs just like it is done in previous PR. I've learnt about that from this line example

* @return {Promise<string|TemplateRenderResult|Array<TemplateRenderResult>|undefined>}

@derberg derberg changed the title fix: jsdocs return statement updation docs: jsdoc return statement update Jan 14, 2025
Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

I changed PR title, as fix indicates release and we do not need to release new artefact for this one. Anyway fix: is not enough if changeset is not provided

@derberg
Copy link
Member

derberg commented Jan 14, 2025

/rtm

@asyncapi-bot asyncapi-bot merged commit 7fe7bbb into asyncapi:master Jan 14, 2025
36 of 40 checks passed
@DhairyaMajmudar
Copy link
Contributor Author

lgtm, thanks!

I changed PR title, as fix indicates release and we do not need to release new artefact for this one. Anyway fix: is not enough if changeset is not provided

No, worries Thank you for your approval. I'll open a PR for updating website with repo too.

@DhairyaMajmudar DhairyaMajmudar deleted the fix/507 branch January 14, 2025 08:01
Copy link
Member

derberg commented Jan 14, 2025

this part is automated: asyncapi/website#3573

@DhairyaMajmudar
Copy link
Contributor Author

this part is automated: asyncapi/website#3573

Fantastic 🔥

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.

Enhance API docs with information about results of code generation with generateFromString using entrypoint
3 participants