Skip to content

Commit

Permalink
fix(asyncapi#507): jsdocs return statment updation with type Template…
Browse files Browse the repository at this point in the history
…RenderResult
  • Loading branch information
DhairyaMajmudar committed Jan 11, 2025
1 parent 59504bc commit edcd1fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions apps/generator/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ Reference API documentation for AsyncAPI Generator library.
* [.executeAfterHook()](#Generator+executeAfterHook)`Promise.<void>`
* [.parseInput()](#Generator+parseInput)
* [.configureTemplate()](#Generator+configureTemplate)
* ~~[.generateFromString(asyncapiString, [parseOptions])](#Generator+generateFromString)`Promise`~~
* [.generateFromURL(asyncapiURL)](#Generator+generateFromURL)`Promise`
* [.generateFromFile(asyncapiFile)](#Generator+generateFromFile)`Promise`
* ~~[.generateFromString(asyncapiString, [parseOptions])](#Generator+generateFromString)`Promise.<(TemplateRenderResult|undefined)>`~~
* [.generateFromURL(asyncapiURL)](#Generator+generateFromURL)`Promise.<(TemplateRenderResult|undefined)>`
* [.generateFromFile(asyncapiFile)](#Generator+generateFromFile)`Promise.<(TemplateRenderResult|undefined)>`
* [.installTemplate([force])](#Generator+installTemplate)
* _static_
* [.getTemplateFile(templateName, filePath, [templatesDir])](#Generator.getTemplateFile)`Promise`
Expand Down
6 changes: 3 additions & 3 deletions apps/generator/lib/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ class Generator {
* @param {String} asyncapiString AsyncAPI string to use as source.
* @param {Object} [parseOptions={}] AsyncAPI Parser parse options. Check out {@link https://www.github.com/asyncapi/parser-js|@asyncapi/parser} for more information.
* @deprecated Use the `generate` function instead. Just change the function name and it works out of the box.
* @return {Promise}
* @return {Promise<TemplateRenderResult|undefined>}
*/
async generateFromString(asyncapiString, parseOptions = {}) {
const isParsableCompatible = asyncapiString && typeof asyncapiString === 'string';
Expand Down Expand Up @@ -466,7 +466,7 @@ class Generator {
* }
*
* @param {String} asyncapiURL Link to AsyncAPI file
* @return {Promise}
* @return {Promise<TemplateRenderResult|undefined>}
*/
async generateFromURL(asyncapiURL) {
const doc = await fetchSpec(asyncapiURL);
Expand All @@ -493,7 +493,7 @@ class Generator {
* }
*
* @param {String} asyncapiFile AsyncAPI file to use as source.
* @return {Promise}
* @return {Promise<TemplateRenderResult|undefined>}
*/
async generateFromFile(asyncapiFile) {
const doc = await readFile(asyncapiFile, { encoding: 'utf8' });
Expand Down

0 comments on commit edcd1fc

Please sign in to comment.