diff options
| author | ST-DDT <[email protected]> | 2023-10-14 10:50:05 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-14 10:50:05 +0200 |
| commit | e228183efc0fe74ee0438fbcb693932358921a20 (patch) | |
| tree | 9e22e728b9a407254935f2c47445756db25df696 /scripts | |
| parent | 5801c79a2df91395a62955c6481dca64a07065ee (diff) | |
| download | faker-e228183efc0fe74ee0438fbcb693932358921a20.tar.xz faker-e228183efc0fe74ee0438fbcb693932358921a20.zip | |
docs: fix bad Promise usage (#2475)
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/apidoc/generate.ts | 6 | ||||
| -rw-r--r-- | scripts/apidoc/signature.ts | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/scripts/apidoc/generate.ts b/scripts/apidoc/generate.ts index e3047131..aa33a46e 100644 --- a/scripts/apidoc/generate.ts +++ b/scripts/apidoc/generate.ts @@ -22,14 +22,14 @@ export async function generate(): Promise<void> { // Useful for manually analyzing the content await app.generateJson(project, pathOutputJson); - const pages = await Promise.all([ + const pages = [ ...(await processFakerClasses(project)), ...(await processModules(project)).sort((a, b) => a.text.localeCompare(b.text) ), await processFakerRandomizer(project), - processFakerUtilities(project), - ]); + await processFakerUtilities(project), + ]; await writeApiPagesIndex(pages.map(({ text, link }) => ({ text, link }))); writeApiDiffIndex( Object.fromEntries(pages.map(({ text, diff }) => [text, diff])) diff --git a/scripts/apidoc/signature.ts b/scripts/apidoc/signature.ts index fe11c78d..2cca92b9 100644 --- a/scripts/apidoc/signature.ts +++ b/scripts/apidoc/signature.ts @@ -226,9 +226,9 @@ async function typeToText(type_?: Type, short = false): Promise<string> { ].join(' | '); } - return `${type.name}<${type.typeArguments - .map(async (t) => await typeToText(t, short)) - .join(', ')}>`; + return `${type.name}<${( + await Promise.all(type.typeArguments.map((t) => typeToText(t, short))) + ).join(', ')}>`; case 'reflection': return declarationTypeToText(type.declaration, short); |
