Skip to content

Commit

Permalink
docs: add object related types
Browse files Browse the repository at this point in the history
  • Loading branch information
kazizi55 committed Jan 8, 2024
1 parent 9db89fe commit 03db669
Show file tree
Hide file tree
Showing 22 changed files with 889 additions and 0 deletions.
21 changes: 21 additions & 0 deletions website/src/routes/api/(types)/BaseSchemaAsync/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: BaseSchemaAsync
description: Base schema async type.
contributors:
- fabian-hiller
- kazizi55
---

import { Property } from '~/components';
import { properties } from './properties';

# BaseSchemaAsync

Base schema async type.

## Definition

- `BaseSchemaAsync` <Property {...properties.BaseSchemaAsync} />
- `async` <Property {...properties.async} />
- `_parse` {/* prettier-ignore */}<Property {...properties._parse} />
- `_types` {/* prettier-ignore */}<Property {...properties._types} />
87 changes: 87 additions & 0 deletions website/src/routes/api/(types)/BaseSchemaAsync/properties.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import type { PropertyProps } from '~/components';

export const properties: Record<string, PropertyProps> = {
BaseSchemaAsync: {
type: {
type: 'custom',
name: 'Object',
generics: [
{
type: 'custom',
name: 'TInput',
default: 'any',
},
{
type: 'custom',
name: 'TOutput',
default: {
type: 'custom',
name: 'TInput',
},
},
],
},
},
async: {
type: {
type: 'boolean',
value: true,
},
},
_parse: {
type: {
type: 'function',
params: [
{
name: 'input',
type: 'unknown',
},
{
name: 'info',
optional: true,
type: {
type: 'custom',
name: 'ParseInfo',
href: '../ParseInfo/',
},
},
],
return: {
type: 'custom',
name: 'Promise',
generics: [
{
type: 'custom',
name: 'SchemaResult',
href: '../SchemaResult/',
generics: [{ type: 'custom', name: 'TOutput' }],
},
],
},
},
},
_types: {
type: [
{
type: 'object',
entries: [
{
key: 'input',
value: {
type: 'custom',
name: 'TInput',
},
},
{
key: 'output',
value: {
type: 'custom',
name: 'TOutput',
},
},
],
},
'undefined',
],
},
};
22 changes: 22 additions & 0 deletions website/src/routes/api/(types)/EntriesInput/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: EntriesInput
description: Entries input type.
contributors:
- fabian-hiller
- kazizi55
---

import { Property } from '~/components';
import { properties } from './properties';

# EntriesInput

Entries input type.

## Generics

- `TEntries` <Property {...properties.TEntries} />

## Definition

- `EntriesInput` <Property {...properties.EntriesInput} />
52 changes: 52 additions & 0 deletions website/src/routes/api/(types)/EntriesInput/properties.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import type { PropertyProps } from '~/components';

export const properties: Record<string, PropertyProps> = {
TEntries: {
type: [
{
type: 'custom',
name: 'ObjectEntries',
href: '../ObjectEntries/',
},
{
type: 'custom',
name: 'ObjectEntriesAsync',
href: '../ObjectEntriesAsync/',
},
],
},
EntriesInput: {
type: {
type: 'object',
entries: [
{
key: {
name: 'TKey',
type: {
type: 'custom',
modifier: 'keyof',
name: 'TEntries',
},
},
value: {
type: 'custom',
name: 'Input',
href: '../Input/',
generics: [
{
type: 'custom',
name: 'TEntries',
indexes: [
{
type: 'custom',
name: 'TKey',
},
],
},
],
},
},
],
},
},
};
22 changes: 22 additions & 0 deletions website/src/routes/api/(types)/EntriesOutput/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: EntriesOutput
description: Entries output type.
contributors:
- fabian-hiller
- kazizi55
---

import { Property } from '~/components';
import { properties } from './properties';

# EntriesOutput

Entries output type.

## Generics

- `TEntries` <Property {...properties.TEntries} />

## Definition

- `EntriesOutput` <Property {...properties.EntriesOutput} />
52 changes: 52 additions & 0 deletions website/src/routes/api/(types)/EntriesOutput/properties.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import type { PropertyProps } from '~/components';

export const properties: Record<string, PropertyProps> = {
TEntries: {
type: [
{
type: 'custom',
name: 'ObjectEntries',
href: '../ObjectEntries/',
},
{
type: 'custom',
name: 'ObjectEntriesAsync',
href: '../ObjectEntriesAsync/',
},
],
},
EntriesOutput: {
type: {
type: 'object',
entries: [
{
key: {
name: 'TKey',
type: {
type: 'custom',
modifier: 'keyof',
name: 'TEntries',
},
},
value: {
type: 'custom',
name: 'Output',
href: '../Output/',
generics: [
{
type: 'custom',
name: 'TEntries',
indexes: [
{
type: 'custom',
name: 'TKey',
},
],
},
],
},
},
],
},
},
};
18 changes: 18 additions & 0 deletions website/src/routes/api/(types)/ObjectEntries/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: ObjectEntries
description: Object entries type.
contributors:
- fabian-hiller
- kazizi55
---

import { Property } from '~/components';
import { properties } from './properties';

# ObjectEntries

Object entries type.

## Definition

- `ObjectEntries` <Property {...properties.ObjectEntries} />
18 changes: 18 additions & 0 deletions website/src/routes/api/(types)/ObjectEntries/properties.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { PropertyProps } from '~/components';

export const properties: Record<string, PropertyProps> = {
ObjectEntries: {
type: {
type: 'custom',
name: 'Record',
generics: [
'string',
{
type: 'custom',
name: 'BaseSchema',
href: '../BaseSchema/',
},
],
},
},
};
18 changes: 18 additions & 0 deletions website/src/routes/api/(types)/ObjectEntriesAsync/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: ObjectEntriesAsync
description: Object entries async type.
contributors:
- fabian-hiller
- kazizi55
---

import { Property } from '~/components';
import { properties } from './properties';

# ObjectEntriesAsync

Object entries async type.

## Definition

- `ObjectEntriesAsync` <Property {...properties.ObjectEntriesAsync} />
25 changes: 25 additions & 0 deletions website/src/routes/api/(types)/ObjectEntriesAsync/properties.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import type { PropertyProps } from '~/components';

export const properties: Record<string, PropertyProps> = {
ObjectEntriesAsync: {
type: {
type: 'custom',
name: 'Record',
generics: [
'string',
[
{
type: 'custom',
name: 'BaseSchema',
href: '../BaseSchema/',
},
{
type: 'custom',
name: 'BaseSchemaAsync',
href: '../BaseSchemaAsync/',
},
],
],
},
},
};
23 changes: 23 additions & 0 deletions website/src/routes/api/(types)/ObjectOutput/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: ObjectOutput
description: Object output type.
contributors:
- fabian-hiller
- kazizi55
---

import { Property } from '~/components';
import { properties } from './properties';

# ObjectOutput

Object output type.

## Generics

- `TEntries` <Property {...properties.TEntries} />
- `TRest` <Property {...properties.TRest} />

## Definition

- `ObjectOutput` <Property {...properties.ObjectOutput} />
Loading

0 comments on commit 03db669

Please sign in to comment.