aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2024-04-01 10:21:18 +0200
committerGitHub <[email protected]>2024-04-01 10:21:18 +0200
commit6191a5d883048b694404dbf42527caba395828ea (patch)
treed0f18f17789cb0bbdb5d6087f1a95772438dfe27 /docs
parent7dae52bfcd93c41ec9d2c4dd4d96a07f31c3dfc1 (diff)
downloadfaker-6191a5d883048b694404dbf42527caba395828ea.tar.xz
faker-6191a5d883048b694404dbf42527caba395828ea.zip
docs: rewrite api-docs generation using ts-morph (#2628)
Diffstat (limited to 'docs')
-rw-r--r--docs/.vitepress/components/api-docs/method-parameters.vue4
-rw-r--r--docs/.vitepress/components/api-docs/method.ts18
-rw-r--r--docs/.vitepress/components/api-docs/method.vue4
3 files changed, 13 insertions, 13 deletions
diff --git a/docs/.vitepress/components/api-docs/method-parameters.vue b/docs/.vitepress/components/api-docs/method-parameters.vue
index fbc28635..7b14133d 100644
--- a/docs/.vitepress/components/api-docs/method-parameters.vue
+++ b/docs/.vitepress/components/api-docs/method-parameters.vue
@@ -1,7 +1,7 @@
<script setup lang="ts">
-import type { MethodParameter } from './method';
+import type { ApiDocsMethodParameter } from './method';
-const props = defineProps<{ parameters: MethodParameter[] }>();
+const props = defineProps<{ parameters: ApiDocsMethodParameter[] }>();
</script>
<template>
diff --git a/docs/.vitepress/components/api-docs/method.ts b/docs/.vitepress/components/api-docs/method.ts
index 3c1b9b95..90310ed0 100644
--- a/docs/.vitepress/components/api-docs/method.ts
+++ b/docs/.vitepress/components/api-docs/method.ts
@@ -1,19 +1,19 @@
-export interface Method {
+export interface ApiDocsMethod {
readonly name: string;
+ readonly deprecated: string | undefined; // HTML
readonly description: string; // HTML
- readonly parameters: MethodParameter[];
+ readonly since: string;
+ readonly parameters: ApiDocsMethodParameter[];
readonly returns: string;
+ readonly throws: string | undefined; // HTML
readonly examples: string; // HTML
- readonly deprecated?: string; // HTML
- readonly since: string;
- readonly sourcePath: string; // URL-Suffix
readonly seeAlsos: string[];
- readonly throws?: string; // HTML
+ readonly sourcePath: string; // URL-Suffix
}
-export interface MethodParameter {
+export interface ApiDocsMethodParameter {
readonly name: string;
- readonly type?: string;
- readonly default?: string;
+ readonly type: string | undefined;
+ readonly default: string | undefined;
readonly description: string; // HTML
}
diff --git a/docs/.vitepress/components/api-docs/method.vue b/docs/.vitepress/components/api-docs/method.vue
index 2b3f0c5b..8e25e8f8 100644
--- a/docs/.vitepress/components/api-docs/method.vue
+++ b/docs/.vitepress/components/api-docs/method.vue
@@ -1,10 +1,10 @@
<script setup lang="ts">
-import type { Method } from './method';
+import type { ApiDocsMethod } from './method';
import MethodParameters from './method-parameters.vue';
import { slugify } from '../../shared/utils/slugify';
import { sourceBaseUrl } from '../../../api/source-base-url';
-const props = defineProps<{ method: Method }>();
+const props = defineProps<{ method: ApiDocsMethod }>();
function seeAlsoToUrl(see: string): string {
const [, module, method] = see.replace(/\(.*/, '').split('\.');