From 5e7bde88e3f7380be314d041a4cc3e74b38f2afa Mon Sep 17 00:00:00 2001 From: Tylor Steinberger Date: Sat, 2 Mar 2024 23:52:07 -0500 Subject: [PATCH] docs: update docs --- docs/context/Extensions.ts.md | 27 +++++++++++++ docs/core/CoreServices.ts.md | 56 +++++++++++++++++++++++++-- docs/{ui => core}/Platform.ts.md | 18 +++++---- docs/core/Push.ts.md | 2 +- docs/core/RefArray.ts.md | 2 +- docs/core/RefAsyncData.ts.md | 2 +- docs/core/RefChunk.ts.md | 2 +- docs/core/RefHashMap.ts.md | 2 +- docs/core/RefHashSet.ts.md | 2 +- docs/core/RefSubject.ts.md | 2 +- docs/core/RootElement.ts.md | 2 +- docs/core/Route.ts.md | 2 +- docs/core/Router.ts.md | 2 +- docs/core/Sink.ts.md | 2 +- docs/core/Subject.ts.md | 2 +- docs/core/Template.ts.md | 2 +- docs/core/UI.ts.md | 2 +- docs/core/Versioned.ts.md | 2 +- docs/environment/index.ts.md | 42 ++++++++++++++++---- docs/fx/AsyncData.ts.md | 11 ++++++ docs/fx/Fx.ts.md | 13 ++++++- docs/fx/RefSubject.ts.md | 62 ++++++++++++++++++------------ docs/id/GetRandomValues.ts.md | 11 ++++++ docs/router/Matcher.ts.md | 10 ++--- docs/storybook/types.ts.md | 2 +- docs/template/Html.ts.md | 11 ++++++ docs/template/Placeholder.ts.md | 14 +++++-- docs/template/Template.ts.md | 3 +- docs/template/Test.ts.md | 2 +- docs/ui/Props.ts.md | 2 +- docs/ui/useClickAway.ts.md | 2 +- docs/ui/usePagination.ts.md | 2 +- docs/wire/index.ts.md | 2 +- packages/context/src/Extensions.ts | 6 +++ packages/core/src/CoreServices.ts | 5 ++- packages/environment/src/index.ts | 9 +++++ packages/id/src/GetRandomValues.ts | 3 ++ 37 files changed, 269 insertions(+), 74 deletions(-) rename docs/{ui => core}/Platform.ts.md (50%) diff --git a/docs/context/Extensions.ts.md b/docs/context/Extensions.ts.md index e883e1113..7a349c84a 100644 --- a/docs/context/Extensions.ts.md +++ b/docs/context/Extensions.ts.md @@ -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) --- @@ -178,6 +181,30 @@ export declare function Tagged(): { Added in v1.0.0 +## Tagged (namespace) + +Added in v1.0.0 + +### Identifier (type alias) + +**Signature** + +```ts +export type Identifier = T extends Actions ? I : T extends Provision ? I : never +``` + +Added in v1.0.0 + +### Service (type alias) + +**Signature** + +```ts +export type Service = T extends Actions ? S : T extends Provision ? S : never +``` + +Added in v1.0.0 + ## withProvision Add Provision to a Tag diff --git a/docs/core/CoreServices.ts.md b/docs/core/CoreServices.ts.md index a705579e7..d8464f312 100644 --- a/docs/core/CoreServices.ts.md +++ b/docs/core/CoreServices.ts.md @@ -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_) --- @@ -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 +``` + +Added in v1.0.0 + +## hydrateFromWindow + +**Signature** + +```ts +export declare function hydrateFromWindow( + window: Window & GlobalThis, + options?: DomServicesElementParams & { + readonly skipRenderScheduling?: boolean + } ): Layer.Layer ``` Added in v1.0.0 + +## server + +**Signature** + +```ts +export declare function server(options: Navigation.InitialMemoryOptions): Layer.Layer +``` + +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 +``` + +Added in v1.0.0 diff --git a/docs/ui/Platform.ts.md b/docs/core/Platform.ts.md similarity index 50% rename from docs/ui/Platform.ts.md rename to docs/core/Platform.ts.md index b0fccec84..8e30c903d 100644 --- a/docs/ui/Platform.ts.md +++ b/docs/core/Platform.ts.md @@ -1,7 +1,7 @@ --- title: Platform.ts -nav_order: 5 -parent: "@typed/ui" +nav_order: 14 +parent: "@typed/core" --- ## Platform overview @@ -35,12 +35,14 @@ Added in v1.0.0 **Signature** ```ts -export declare function toHttpRouter( - matcher: RouteMatcher -): HttpServer.router.Router< - R | RenderTemplate | RenderContext.RenderContext | ServerRequest | Scope.Scope, - E | GuardsNotMatched -> +export declare function toHttpRouter( + matcher: RouteMatcher, + options?: { + layout?: (content: Fx.Fx) => Fx.Fx + base?: string + environment?: "server" | "static" + } +): HttpServer.router.Router | ServerRequest, E | E2 | GuardsNotMatched> ``` Added in v1.0.0 diff --git a/docs/core/Push.ts.md b/docs/core/Push.ts.md index f67bb9e6f..4dd7231b3 100644 --- a/docs/core/Push.ts.md +++ b/docs/core/Push.ts.md @@ -1,6 +1,6 @@ --- title: Push.ts -nav_order: 14 +nav_order: 15 parent: "@typed/core" --- diff --git a/docs/core/RefArray.ts.md b/docs/core/RefArray.ts.md index e3ea0dcaa..7a1d08a85 100644 --- a/docs/core/RefArray.ts.md +++ b/docs/core/RefArray.ts.md @@ -1,6 +1,6 @@ --- title: RefArray.ts -nav_order: 15 +nav_order: 16 parent: "@typed/core" --- diff --git a/docs/core/RefAsyncData.ts.md b/docs/core/RefAsyncData.ts.md index 6b8a89bec..fda4fc38f 100644 --- a/docs/core/RefAsyncData.ts.md +++ b/docs/core/RefAsyncData.ts.md @@ -1,6 +1,6 @@ --- title: RefAsyncData.ts -nav_order: 16 +nav_order: 17 parent: "@typed/core" --- diff --git a/docs/core/RefChunk.ts.md b/docs/core/RefChunk.ts.md index 2bb522801..97c0da62e 100644 --- a/docs/core/RefChunk.ts.md +++ b/docs/core/RefChunk.ts.md @@ -1,6 +1,6 @@ --- title: RefChunk.ts -nav_order: 17 +nav_order: 18 parent: "@typed/core" --- diff --git a/docs/core/RefHashMap.ts.md b/docs/core/RefHashMap.ts.md index 5909e9dd4..223a959be 100644 --- a/docs/core/RefHashMap.ts.md +++ b/docs/core/RefHashMap.ts.md @@ -1,6 +1,6 @@ --- title: RefHashMap.ts -nav_order: 18 +nav_order: 19 parent: "@typed/core" --- diff --git a/docs/core/RefHashSet.ts.md b/docs/core/RefHashSet.ts.md index 910da5280..9298d2c97 100644 --- a/docs/core/RefHashSet.ts.md +++ b/docs/core/RefHashSet.ts.md @@ -1,6 +1,6 @@ --- title: RefHashSet.ts -nav_order: 19 +nav_order: 20 parent: "@typed/core" --- diff --git a/docs/core/RefSubject.ts.md b/docs/core/RefSubject.ts.md index c0088b662..46447c041 100644 --- a/docs/core/RefSubject.ts.md +++ b/docs/core/RefSubject.ts.md @@ -1,6 +1,6 @@ --- title: RefSubject.ts -nav_order: 20 +nav_order: 21 parent: "@typed/core" --- diff --git a/docs/core/RootElement.ts.md b/docs/core/RootElement.ts.md index a8b315081..8b087bb47 100644 --- a/docs/core/RootElement.ts.md +++ b/docs/core/RootElement.ts.md @@ -1,6 +1,6 @@ --- title: RootElement.ts -nav_order: 21 +nav_order: 22 parent: "@typed/core" --- diff --git a/docs/core/Route.ts.md b/docs/core/Route.ts.md index beb6316c6..78d0dc08a 100644 --- a/docs/core/Route.ts.md +++ b/docs/core/Route.ts.md @@ -1,6 +1,6 @@ --- title: Route.ts -nav_order: 22 +nav_order: 23 parent: "@typed/core" --- diff --git a/docs/core/Router.ts.md b/docs/core/Router.ts.md index f772ff1fa..6b2870a85 100644 --- a/docs/core/Router.ts.md +++ b/docs/core/Router.ts.md @@ -1,6 +1,6 @@ --- title: Router.ts -nav_order: 23 +nav_order: 24 parent: "@typed/core" --- diff --git a/docs/core/Sink.ts.md b/docs/core/Sink.ts.md index 705473eb0..1ea1d2f6d 100644 --- a/docs/core/Sink.ts.md +++ b/docs/core/Sink.ts.md @@ -1,6 +1,6 @@ --- title: Sink.ts -nav_order: 24 +nav_order: 25 parent: "@typed/core" --- diff --git a/docs/core/Subject.ts.md b/docs/core/Subject.ts.md index 3d2cb3329..a2ddf2459 100644 --- a/docs/core/Subject.ts.md +++ b/docs/core/Subject.ts.md @@ -1,6 +1,6 @@ --- title: Subject.ts -nav_order: 25 +nav_order: 26 parent: "@typed/core" --- diff --git a/docs/core/Template.ts.md b/docs/core/Template.ts.md index 7198d57e3..7039b7188 100644 --- a/docs/core/Template.ts.md +++ b/docs/core/Template.ts.md @@ -1,6 +1,6 @@ --- title: Template.ts -nav_order: 26 +nav_order: 27 parent: "@typed/core" --- diff --git a/docs/core/UI.ts.md b/docs/core/UI.ts.md index bc3b93175..81fc3d598 100644 --- a/docs/core/UI.ts.md +++ b/docs/core/UI.ts.md @@ -1,6 +1,6 @@ --- title: UI.ts -nav_order: 27 +nav_order: 28 parent: "@typed/core" --- diff --git a/docs/core/Versioned.ts.md b/docs/core/Versioned.ts.md index d760c8ad3..7949f8e55 100644 --- a/docs/core/Versioned.ts.md +++ b/docs/core/Versioned.ts.md @@ -1,6 +1,6 @@ --- title: Versioned.ts -nav_order: 28 +nav_order: 29 parent: "@typed/core" --- diff --git a/docs/environment/index.ts.md b/docs/environment/index.ts.md index f24c84d05..cef0b350f 100644 --- a/docs/environment/index.ts.md +++ b/docs/environment/index.ts.md @@ -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) @@ -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"> } ``` @@ -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 & { + readonly test: `test:${T}` +} ``` Added in v1.0.0 diff --git a/docs/fx/AsyncData.ts.md b/docs/fx/AsyncData.ts.md index 8eb110f49..817fbfa6e 100644 --- a/docs/fx/AsyncData.ts.md +++ b/docs/fx/AsyncData.ts.md @@ -30,6 +30,7 @@ Added in v1.20.0 - [done](#done) - [fail](#fail) - [failCause](#failcause) + - [isSuccess](#issuccess) - [mapInput](#mapinput) - [mapInputEffect](#mapinputeffect) - [matchAsyncData](#matchasyncdata) @@ -228,6 +229,16 @@ export declare const failCause: { Added in v1.20.0 +## isSuccess + +**Signature** + +```ts +export declare const isSuccess: (ref: RefAsyncData) => RefSubject.Computed +``` + +Added in v1.20.0 + ## mapInput Map the input value diff --git a/docs/fx/Fx.ts.md b/docs/fx/Fx.ts.md index c8faa3366..0e9cb58b5 100644 --- a/docs/fx/Fx.ts.md +++ b/docs/fx/Fx.ts.md @@ -247,6 +247,7 @@ Added in v1.20.0 - [toEnqueue](#toenqueue) - [toReadonlyArray](#toreadonlyarray) - [tuple](#tuple) + - [unify](#unify) - [uninterruptible](#uninterruptible) - [until](#until) - [when](#when) @@ -652,7 +653,7 @@ Added in v1.20.0 **Signature** ```ts -export type Unify = T extends Fx | infer _ ? Fx : never +export type Unify = [T] extends [Fx | infer _] ? Fx : never ``` Added in v1.20.0 @@ -3575,6 +3576,16 @@ export declare const tuple: []>( Added in v1.20.0 +## unify + +**Signature** + +```ts +export declare const unify: >(fx: T) => Fx.Unify +``` + +Added in v1.20.0 + ## uninterruptible **Signature** diff --git a/docs/fx/RefSubject.ts.md b/docs/fx/RefSubject.ts.md index 03e260121..cfed28647 100644 --- a/docs/fx/RefSubject.ts.md +++ b/docs/fx/RefSubject.ts.md @@ -351,7 +351,14 @@ Added in v1.20.0 **Signature** ```ts -export type Context = T extends RefSubject ? R : never +export type Context = + T extends RefSubject + ? R + : T extends Computed + ? R + : T extends Filtered + ? R + : never ``` Added in v1.20.0 @@ -361,7 +368,14 @@ Added in v1.20.0 **Signature** ```ts -export type Error = T extends RefSubject ? E : never +export type Error = + T extends RefSubject + ? E + : T extends Computed + ? E + : T extends Filtered + ? E + : never ``` Added in v1.20.0 @@ -381,7 +395,14 @@ Added in v1.20.0 **Signature** ```ts -export type Success = T extends RefSubject ? A : never +export type Success = + T extends RefSubject + ? A + : T extends Computed + ? A + : T extends Filtered + ? A + : never ``` Added in v1.20.0 @@ -783,17 +804,13 @@ Added in v1.20.0 ```ts export declare const map: { - ( - f: (a: A) => B - ): { - (ref: RefSubject): Computed - (ref: Computed): Computed - (ref: Filtered): Filtered - ( - versioned: Versioned.Versioned, - f: (a: A) => B - ): Computed - } + ( + f: (a: RefSubject.Success) => B + ): ( + ref: T + ) => T extends Filtered.Any + ? Filtered, RefSubject.Context> + : Computed, RefSubject.Context> (ref: RefSubject | Computed, f: (a: A) => B): Computed (filtered: Filtered, f: (a: A) => B): Filtered ( @@ -813,16 +830,13 @@ Added in v1.20.0 ```ts export declare const mapEffect: { - ( - f: (a: A) => Effect.Effect - ): { - (ref: RefSubject | Computed): Computed - (ref: Filtered): Filtered - ( - versioned: Versioned.Versioned, - f: (a: A) => Effect.Effect - ): Computed - } + ( + f: (a: RefSubject.Success) => Effect.Effect + ): ( + ref: T + ) => T extends Filtered.Any + ? Filtered, R2 | RefSubject.Context> + : Computed, R2 | RefSubject.Context> ( ref: RefSubject | Computed, f: (a: A) => Effect.Effect diff --git a/docs/id/GetRandomValues.ts.md b/docs/id/GetRandomValues.ts.md index deb51fab5..8962ee7fb 100644 --- a/docs/id/GetRandomValues.ts.md +++ b/docs/id/GetRandomValues.ts.md @@ -16,6 +16,7 @@ Added in v1.0.0 - [GetRandomValues](#getrandomvalues) - [GetRandomValues (type alias)](#getrandomvalues-type-alias) - [getRandomValues](#getrandomvalues-1) + - [getRandomValuesNode](#getrandomvaluesnode) - [nodeCrypto](#nodecrypto) - [pseudoRandom](#pseudorandom) - [webCrypto](#webcrypto) @@ -54,6 +55,16 @@ export declare const getRandomValues: Layer.Layer Added in v1.0.0 +## getRandomValuesNode + +**Signature** + +```ts +export declare const getRandomValuesNode: (crypto: typeof length: number) => Uint8Array +``` + +Added in v1.0.0 + ## nodeCrypto **Signature** diff --git a/docs/router/Matcher.ts.md b/docs/router/Matcher.ts.md index f6fd48214..14aa8c00e 100644 --- a/docs/router/Matcher.ts.md +++ b/docs/router/Matcher.ts.md @@ -41,20 +41,20 @@ Added in v1.0.0 **Signature** ```ts -export interface RouteMatcher { - readonly guards: ReadonlyArray> +export interface RouteMatcher { + readonly guards: ReadonlyArray> readonly match: { ( route: Route.Route

| P, f: (ref: RefSubject.RefSubject>) => Fx.Fx - ): RouteMatcher, E | E2, A | B> + ): RouteMatcher> ( route: Route.Route

| P, guard: Guard.Guard, B, E2, R2>, f: (ref: RefSubject.RefSubject) => Fx.Fx - ): RouteMatcher | Exclude, E | E2 | E3, A | C> + ): RouteMatcher | Exclude> } readonly to: { @@ -80,7 +80,7 @@ export interface RouteMatcher { readonly redirect: ( route: Route.Route

| P, - ...[params]: [keyof Path.ParamsOf

] extends [never] ? [{}?] : [Path.ParamsOf

] + ...params: [keyof Path.ParamsOf

] extends [never] ? [{}?] : [Path.ParamsOf

] ) => Fx.Fx< A, Exclude, diff --git a/docs/storybook/types.ts.md b/docs/storybook/types.ts.md index 6dbdac40a..70978ae26 100644 --- a/docs/storybook/types.ts.md +++ b/docs/storybook/types.ts.md @@ -126,7 +126,7 @@ Added in v1.0.0 ```ts export type StoryObj = never> = Types.Simplify< Omit>, "render"> & { - readonly render: ( + render: ( args: Args, ctx: Types.Simplify & { readonly component: T["component"] }> ) => TypedRenderer["storyResult"] diff --git a/docs/template/Html.ts.md b/docs/template/Html.ts.md index f0d541f19..82c058856 100644 --- a/docs/template/Html.ts.md +++ b/docs/template/Html.ts.md @@ -13,6 +13,7 @@ Added in v1.0.0

Table of contents

- [utils](#utils) + - [renderHtmlTemplate](#renderhtmltemplate) - [renderToHtml](#rendertohtml) - [renderToHtmlString](#rendertohtmlstring) - [serverLayer](#serverlayer) @@ -22,6 +23,16 @@ Added in v1.0.0 # utils +## renderHtmlTemplate + +**Signature** + +```ts +export declare function renderHtmlTemplate(ctx: RenderContext.RenderContext) +``` + +Added in v1.0.0 + ## renderToHtml **Signature** diff --git a/docs/template/Placeholder.ts.md b/docs/template/Placeholder.ts.md index 5f394f759..3b6d51aaa 100644 --- a/docs/template/Placeholder.ts.md +++ b/docs/template/Placeholder.ts.md @@ -61,7 +61,11 @@ Added in v1.0.0 **Signature** ```ts -export type Context = [T] extends [never] ? never : T extends Placeholder ? R : never +export type Context = [T] extends [never] + ? never + : [T] extends [Placeholder] + ? R + : never ``` Added in v1.0.0 @@ -71,7 +75,7 @@ Added in v1.0.0 **Signature** ```ts -export type Error = [T] extends [never] ? never : T extends Placeholder ? E : never +export type Error = [T] extends [never] ? never : [T] extends [Placeholder] ? E : never ``` Added in v1.0.0 @@ -81,7 +85,11 @@ Added in v1.0.0 **Signature** ```ts -export type Success = [T] extends [never] ? never : T extends Placeholder ? A : never +export type Success = [T] extends [never] + ? never + : [T] extends [Placeholder] + ? A + : never ``` Added in v1.0.0 diff --git a/docs/template/Template.ts.md b/docs/template/Template.ts.md index 91dbb575e..7f6255e6e 100644 --- a/docs/template/Template.ts.md +++ b/docs/template/Template.ts.md @@ -546,7 +546,8 @@ Added in v1.0.0 export declare class Template { constructor( readonly nodes: ReadonlyArray, readonly hash: string, - // Parts are a array of Parts to the respective path from the root node to access it during + // Parts are a array of Parts to the respective path from the root node to access it prior to rendering + /// any nodes/elements into the template. readonly parts: ReadonlyArray]> ) } ``` diff --git a/docs/template/Test.ts.md b/docs/template/Test.ts.md index 7e399108b..646434cb7 100644 --- a/docs/template/Test.ts.md +++ b/docs/template/Test.ts.md @@ -136,7 +136,7 @@ export declare function testRender( fx: Fx.Fx, options?: HappyDOMOptions & { readonly [K in keyof DomServicesElementParams]?: (document: Document) => DomServicesElementParams[K] - } + } & { renderTimeout?: DurationInput } ): Effect.Effect< TestRender, never, diff --git a/docs/ui/Props.ts.md b/docs/ui/Props.ts.md index f9a0c55fe..e53a7502b 100644 --- a/docs/ui/Props.ts.md +++ b/docs/ui/Props.ts.md @@ -1,6 +1,6 @@ --- title: Props.ts -nav_order: 6 +nav_order: 5 parent: "@typed/ui" --- diff --git a/docs/ui/useClickAway.ts.md b/docs/ui/useClickAway.ts.md index ffa423c81..40fe472d4 100644 --- a/docs/ui/useClickAway.ts.md +++ b/docs/ui/useClickAway.ts.md @@ -1,6 +1,6 @@ --- title: useClickAway.ts -nav_order: 7 +nav_order: 6 parent: "@typed/ui" --- diff --git a/docs/ui/usePagination.ts.md b/docs/ui/usePagination.ts.md index c703a9b27..24fde436b 100644 --- a/docs/ui/usePagination.ts.md +++ b/docs/ui/usePagination.ts.md @@ -1,6 +1,6 @@ --- title: usePagination.ts -nav_order: 8 +nav_order: 7 parent: "@typed/ui" --- diff --git a/docs/wire/index.ts.md b/docs/wire/index.ts.md index adfd2d451..d615a139b 100644 --- a/docs/wire/index.ts.md +++ b/docs/wire/index.ts.md @@ -174,7 +174,7 @@ Check if a node is a DocumentFragment **Signature** ```ts -export declare function isDocumentFragment(node: Rendered): node is Node +export declare function isDocumentFragment(node: Rendered): node is DocumentFragment ``` Added in v1.0.0 diff --git a/packages/context/src/Extensions.ts b/packages/context/src/Extensions.ts index 4fbce7b28..67efb9de5 100644 --- a/packages/context/src/Extensions.ts +++ b/packages/context/src/Extensions.ts @@ -45,7 +45,13 @@ export function Tagged(id?: unknown) { * @since 1.0.0 */ export namespace Tagged { + /** + * @since 1.0.0 + */ export type Service = T extends Actions ? S : T extends Provision ? S : never + /** + * @since 1.0.0 + */ export type Identifier = T extends Actions ? I : T extends Provision ? I : never } diff --git a/packages/core/src/CoreServices.ts b/packages/core/src/CoreServices.ts index 5a339e1ad..06532f327 100644 --- a/packages/core/src/CoreServices.ts +++ b/packages/core/src/CoreServices.ts @@ -50,6 +50,7 @@ export function fromWindow( Router.browser ).pipe(Layer.provideMerge(renderLayer(window, options))) } + /** * @since 1.0.0 */ @@ -97,6 +98,8 @@ function static_( } export { - /** */ + /** + * @since 1.0.0 + */ static_ as static } diff --git a/packages/environment/src/index.ts b/packages/environment/src/index.ts index 497e519ae..4ebaec960 100644 --- a/packages/environment/src/index.ts +++ b/packages/environment/src/index.ts @@ -12,7 +12,13 @@ export type Environment = | Environment.Value | `test:${Environment.Value}` +/** + * @since 1.0.0 + */ export namespace Environment { + /** + * @since 1.0.0 + */ export type Value = | "dom" | "server" @@ -30,6 +36,9 @@ class EnvironmentValueImpl extends String { } } +/** + * @since 1.0.0 + */ export type EnvironmentValue = T & { readonly test: `test:${T}` } diff --git a/packages/id/src/GetRandomValues.ts b/packages/id/src/GetRandomValues.ts index a338f350f..b0c87ce20 100644 --- a/packages/id/src/GetRandomValues.ts +++ b/packages/id/src/GetRandomValues.ts @@ -26,6 +26,9 @@ const getRandomValuesWeb = (crypto: Crypto, length: number) => crypto.getRandomV export const webCrypto = (crypto: Crypto): Layer.Layer => GetRandomValues.implement((length) => Effect.sync(() => getRandomValuesWeb(crypto, length))) +/** + * @since 1.0.0 + */ // eslint-disable-next-line @typescript-eslint/consistent-type-imports export const getRandomValuesNode = (crypto: typeof import("node:crypto"), length: number) => { const bytes = crypto.randomBytes(length)