Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/deep/path.ts>Path.Result

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
namespace Path.Result
import { Path } from "https://deno.land/x/rimbu@0.13.1/deep/path.ts";
const { Result } = Path;

Type Aliases

Determines the result type for an array of tokens representing subpaths in type T.

Determines the result of getting the property/index K from type T, taking into account that the value may be optional.

Converts a path string into separate tokens in a string array.

type alias Path.Result
import { type Path } from "https://deno.land/x/rimbu@0.13.1/deep/path.ts";
const { Result } = Path;

The result type when selecting from object type T a path with type P.

Examples

Example 1

let r!: Path.Result<{ a: { b: { c: number } } }, 'a.b'>;
// => type of r: { c: number }

Type Parameters

T
P extends string
definition: Path.Result.For<T, Path.Result.Tokenize<P>, false>