Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TylorS committed Mar 3, 2024
1 parent 6d69d94 commit 5e7bde8
Show file tree
Hide file tree
Showing 37 changed files with 269 additions and 74 deletions.
27 changes: 27 additions & 0 deletions docs/context/Extensions.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ Added in v1.0.0
- [Provision](#provision)
- [Provision (interface)](#provision-interface)
- [Tagged](#tagged)
- [Tagged (namespace)](#tagged-namespace)
- [Identifier (type alias)](#identifier-type-alias)
- [Service (type alias)](#service-type-alias)
- [withProvision](#withprovision)

---
Expand Down Expand Up @@ -178,6 +181,30 @@ export declare function Tagged<S>(): {

Added in v1.0.0

## Tagged (namespace)

Added in v1.0.0

### Identifier (type alias)

**Signature**

```ts
export type Identifier<T> = T extends Actions<infer I, any> ? I : T extends Provision<infer I, any> ? I : never
```

Added in v1.0.0

### Service (type alias)

**Signature**

```ts
export type Service<T> = T extends Actions<any, infer S> ? S : T extends Provision<any, infer S> ? S : never
```

Added in v1.0.0

## withProvision

Add Provision to a Tag
Expand Down
56 changes: 53 additions & 3 deletions docs/core/CoreServices.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Added in v1.0.0
- [CoreDomServices (type alias)](#coredomservices-type-alias)
- [CoreServices (type alias)](#coreservices-type-alias)
- [fromWindow](#fromwindow)
- [hydrateFromWindow](#hydratefromwindow)
- [server](#server)
- [static](#static)
- [static\_](#static_)

---

Expand Down Expand Up @@ -46,21 +50,67 @@ export type CoreServices =
| Navigation.Navigation
| Router.CurrentRoute
| RenderContext.RenderContext
| RenderTemplate
```
Added in v1.0.0
## fromWindow
Construct CoreServices from a browser's Window object
**Signature**
```ts
export declare function fromWindow(
window: Window & GlobalThis,
options?: DomServicesElementParams & { readonly skipRenderScheduling?: boolean }
options?: DomServicesElementParams & {
readonly skipRenderScheduling?: boolean
}
): Layer.Layer<CoreDomServices>
```

Added in v1.0.0

## hydrateFromWindow

**Signature**

```ts
export declare function hydrateFromWindow(
window: Window & GlobalThis,
options?: DomServicesElementParams & {
readonly skipRenderScheduling?: boolean
}
): Layer.Layer<CoreDomServices>
```

Added in v1.0.0

## server

**Signature**

```ts
export declare function server(options: Navigation.InitialMemoryOptions): Layer.Layer<CoreServices>
```

Added in v1.0.0

## static

**Signature**

```ts
export declare const static: typeof static_
```

Added in v1.0.0

## static\_

**Signature**

```ts
function static_(options: Navigation.InitialMemoryOptions): Layer.Layer<CoreServices>
```

Added in v1.0.0
18 changes: 10 additions & 8 deletions docs/ui/Platform.ts.md → docs/core/Platform.ts.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Platform.ts
nav_order: 5
parent: "@typed/ui"
nav_order: 14
parent: "@typed/core"
---

## Platform overview
Expand Down Expand Up @@ -35,12 +35,14 @@ Added in v1.0.0
**Signature**

```ts
export declare function toHttpRouter<E, R>(
matcher: RouteMatcher<RenderEvent, E, R>
): HttpServer.router.Router<
R | RenderTemplate | RenderContext.RenderContext | ServerRequest | Scope.Scope,
E | GuardsNotMatched
>
export declare function toHttpRouter<E, R, E2 = never, R2 = never>(
matcher: RouteMatcher<RenderEvent, E, R>,
options?: {
layout?: (content: Fx.Fx<RenderEvent, E, R>) => Fx.Fx<RenderEvent, E2, R2>
base?: string
environment?: "server" | "static"
}
): HttpServer.router.Router<Exclude<R | R2, CoreServices> | ServerRequest, E | E2 | GuardsNotMatched>
```

Added in v1.0.0
2 changes: 1 addition & 1 deletion docs/core/Push.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Push.ts
nav_order: 14
nav_order: 15
parent: "@typed/core"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/core/RefArray.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: RefArray.ts
nav_order: 15
nav_order: 16
parent: "@typed/core"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/core/RefAsyncData.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: RefAsyncData.ts
nav_order: 16
nav_order: 17
parent: "@typed/core"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/core/RefChunk.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: RefChunk.ts
nav_order: 17
nav_order: 18
parent: "@typed/core"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/core/RefHashMap.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: RefHashMap.ts
nav_order: 18
nav_order: 19
parent: "@typed/core"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/core/RefHashSet.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: RefHashSet.ts
nav_order: 19
nav_order: 20
parent: "@typed/core"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/core/RefSubject.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: RefSubject.ts
nav_order: 20
nav_order: 21
parent: "@typed/core"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/core/RootElement.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: RootElement.ts
nav_order: 21
nav_order: 22
parent: "@typed/core"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/core/Route.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Route.ts
nav_order: 22
nav_order: 23
parent: "@typed/core"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/core/Router.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Router.ts
nav_order: 23
nav_order: 24
parent: "@typed/core"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/core/Sink.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Sink.ts
nav_order: 24
nav_order: 25
parent: "@typed/core"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/core/Subject.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Subject.ts
nav_order: 25
nav_order: 26
parent: "@typed/core"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/core/Template.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Template.ts
nav_order: 26
nav_order: 27
parent: "@typed/core"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/core/UI.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: UI.ts
nav_order: 27
nav_order: 28
parent: "@typed/core"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/core/Versioned.ts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Versioned.ts
nav_order: 28
nav_order: 29
parent: "@typed/core"
---

Expand Down
42 changes: 35 additions & 7 deletions docs/environment/index.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Added in v1.0.0
- [CurrentEnvironment (type alias)](#currentenvironment-type-alias)
- [Environment](#environment)
- [Environment (type alias)](#environment-type-alias)
- [Environment (namespace)](#environment-namespace)
- [Value (type alias)](#value-type-alias)
- [EnvironmentValue (type alias)](#environmentvalue-type-alias)
- [isDom](#isdom)
- [isServer](#isserver)
- [isServiceWorker](#isserviceworker)
Expand Down Expand Up @@ -56,12 +59,11 @@ Added in v1.0.0
```ts
export declare const Environment: {
readonly dom: "dom"
readonly server: "server"
readonly serviceWorker: "serviceWorker"
readonly static: "static"
readonly test: "test"
readonly webWorker: "webWorker"
dom: EnvironmentValue<"dom">
server: EnvironmentValue<"server">
serviceWorker: EnvironmentValue<"serviceWorker">
static: EnvironmentValue<"static">
webWorker: EnvironmentValue<"webWorker">
}
```
Expand All @@ -72,7 +74,33 @@ Added in v1.0.0
**Signature**
```ts
export type Environment = "dom" | "server" | "serviceWorker" | "static" | "test" | "webWorker"
export type Environment = Environment.Value | `test:${Environment.Value}`
```
Added in v1.0.0
## Environment (namespace)
Added in v1.0.0
### Value (type alias)
**Signature**
```ts
export type Value = "dom" | "server" | "serviceWorker" | "static" | "webWorker"
```
Added in v1.0.0
## EnvironmentValue (type alias)
**Signature**
```ts
export type EnvironmentValue<T extends Environment.Value> = T & {
readonly test: `test:${T}`
}
```
Added in v1.0.0
Expand Down
11 changes: 11 additions & 0 deletions docs/fx/AsyncData.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Added in v1.20.0
- [done](#done)
- [fail](#fail)
- [failCause](#failcause)
- [isSuccess](#issuccess)
- [mapInput](#mapinput)
- [mapInputEffect](#mapinputeffect)
- [matchAsyncData](#matchasyncdata)
Expand Down Expand Up @@ -228,6 +229,16 @@ export declare const failCause: {

Added in v1.20.0

## isSuccess

**Signature**

```ts
export declare const isSuccess: <A, E, R>(ref: RefAsyncData<A, E, R>) => RefSubject.Computed<boolean, never, R>
```

Added in v1.20.0

## mapInput

Map the input value
Expand Down
13 changes: 12 additions & 1 deletion docs/fx/Fx.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ Added in v1.20.0
- [toEnqueue](#toenqueue)
- [toReadonlyArray](#toreadonlyarray)
- [tuple](#tuple)
- [unify](#unify)
- [uninterruptible](#uninterruptible)
- [until](#until)
- [when](#when)
Expand Down Expand Up @@ -652,7 +653,7 @@ Added in v1.20.0
**Signature**
```ts
export type Unify<T> = T extends Fx<infer A, infer E, infer R> | infer _ ? Fx<A, E, R> : never
export type Unify<T> = [T] extends [Fx<infer A, infer E, infer R> | infer _] ? Fx<A, E, R> : never
```
Added in v1.20.0
Expand Down Expand Up @@ -3575,6 +3576,16 @@ export declare const tuple: <const FX extends readonly Fx<any, any, any>[]>(

Added in v1.20.0

## unify

**Signature**

```ts
export declare const unify: <T extends Fx<any, any, any>>(fx: T) => Fx.Unify<T>
```

Added in v1.20.0

## uninterruptible

**Signature**
Expand Down
Loading

0 comments on commit 5e7bde8

Please sign in to comment.