diff options
| author | ST-DDT <[email protected]> | 2023-04-28 15:23:50 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-04-28 13:23:50 +0000 |
| commit | 3cfeb3814703d12a9e95ed684fc2c8f94d1f2c72 (patch) | |
| tree | 0c9f4148244bfd02d9131132366ff59a8b941673 /test/scripts/apidoc/utils.ts | |
| parent | 971f36371bf924b334cb7766fd87afa7b484119a (diff) | |
| download | faker-3cfeb3814703d12a9e95ed684fc2c8f94d1f2c72.tar.xz faker-3cfeb3814703d12a9e95ed684fc2c8f94d1f2c72.zip | |
docs: fix full url to absolute conversion (#2101)
Diffstat (limited to 'test/scripts/apidoc/utils.ts')
| -rw-r--r-- | test/scripts/apidoc/utils.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/scripts/apidoc/utils.ts b/test/scripts/apidoc/utils.ts index 281fb2ef..2addfe65 100644 --- a/test/scripts/apidoc/utils.ts +++ b/test/scripts/apidoc/utils.ts @@ -39,3 +39,23 @@ export function loadExampleMethods(): Record<string, SignatureReflection> { true )['SignatureTest'][1]; } + +/** + * Loads the example modules using TypeDoc. + */ +export function loadExampleModules(): Record<string, DeclarationReflection> { + const modules = loadProjectModules( + { + entryPoints: ['test/scripts/apidoc/module.example.ts'], + tsconfig: 'test/scripts/apidoc/tsconfig.json', + }, + true + ); + + const result: Record<string, DeclarationReflection> = {}; + for (const key in modules) { + result[key] = modules[key][0]; + } + + return result; +} |
