You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/generators.mjs
+6-9Lines changed: 6 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,6 @@ import { allGenerators } from './generators/index.mjs';
4
4
importWorkerPoolfrom'./threading/index.mjs';
5
5
6
6
/**
7
-
* @typedef {{ ast: GeneratorMetadata<ApiDocMetadataEntry, ApiDocMetadataEntry>}} AstGenerator The AST "generator" is a facade for the AST tree and it isn't really a generator
8
-
* @typedef {AvailableGenerators & AstGenerator} AllGenerators A complete set of the available generators, including the AST one
9
-
* @param markdownInput
10
-
* @param jsInput
11
-
*
12
7
* This method creates a system that allows you to register generators
13
8
* and then execute them in a specific order, keeping track of the
14
9
* generation process, and handling errors that may occur from the
@@ -21,18 +16,20 @@ import WorkerPool from './threading/index.mjs';
21
16
* Generators can also write to files. These would usually be considered
22
17
* the final generators in the chain.
23
18
*
24
-
* @param {ApiDocMetadataEntry} markdownInput The parsed API doc metadata entries
* @typedef {{ ast: GeneratorMetadata<ParserOutput, ParserOutput>}} AstGenerator The AST "generator" is a facade for the AST tree and it isn't really a generator
20
+
* @typedef {AvailableGenerators & AstGenerator} AllGenerators A complete set of the available generators, including the AST one
21
+
*
22
+
* @param {ParserOutput} input The API doc AST tree
26
23
*/
27
-
constcreateGenerator=markdownInput=>{
24
+
constcreateGenerator=input=>{
28
25
/**
29
26
* We store all the registered generators to be processed
30
27
* within a Record, so we can access their results at any time whenever needed
31
28
* (we store the Promises of the generator outputs)
32
29
*
33
30
* @type {{ [K in keyof AllGenerators]: ReturnType<AllGenerators[K]['generate']> }}
0 commit comments