From 7ffbd8f1184f3088f967f4b794cd75c642dc9c3d Mon Sep 17 00:00:00 2001 From: tada5hi Date: Sun, 7 Aug 2022 21:31:08 +0200 Subject: [PATCH] minor enhacement for api-reference(s) --- docs/guide/build-api-reference.md | 20 +++++++++++++------- docs/guide/parse-api-reference.md | 8 ++++++-- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/docs/guide/build-api-reference.md b/docs/guide/build-api-reference.md index 52e4ac9d..3d32c511 100644 --- a/docs/guide/build-api-reference.md +++ b/docs/guide/build-api-reference.md @@ -8,7 +8,7 @@ The allowed input keys are values of the [Parameter](parameter-api-reference.md# **Type** ```ts -function buildQuery(record: BuildInput, options?: BuildOptions): string; +declare function buildQuery(record: BuildInput, options?: BuildOptions): string; ``` **Example** @@ -56,13 +56,10 @@ The function returns a string, which can be parsed with the [parseQuery](parse-a I.e. `/users?page[limit]=10&page[offset]=0&include=profile&filter[id]=1&fields[user]=id,name` -## `BuildOptions` +**References** +- [BuildInput](#buildinput) +- [BuildOptions](#buildoptions) -```typescript -export type BuildOptions = { - // empty type for now :) -} -``` ## `BuildInput` ```typescript @@ -72,3 +69,12 @@ export type BuildInput< [T in Parameter | URLParameter]?: BuildParameterInput } ``` + +## `BuildOptions` + +```typescript +export type BuildOptions = { + // empty type for now :) +} +``` + diff --git a/docs/guide/parse-api-reference.md b/docs/guide/parse-api-reference.md index e700a575..354ad39e 100644 --- a/docs/guide/parse-api-reference.md +++ b/docs/guide/parse-api-reference.md @@ -8,7 +8,7 @@ parsed data as value. **Type** ```ts -function parseQuery(input: ParseInput, options?: ParseOptions): string; +declare function parseQuery(input: ParseInput, options?: ParseOptions): string; ``` **Example** @@ -55,6 +55,10 @@ console.log(output); The function returns an object. +**References** +- [ParseOutput](#parseoutput) +- [ParseOptions](#parseoptions) + ## `parseQueryParameter` Parse a query string to an efficient data structure ⚡. The output will @@ -63,7 +67,7 @@ parsed data as value. **Type** ```ts -function parseQueryParameter( +declare function parseQueryParameter( key: T, input: unknown, options?: ParseParameterOptions