Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "api/deref"

Index

Interfaces

Type aliases

Functions

Type aliases

Derefed

Derefed<T>: T extends IDeref<any> ? ReturnType<T["deref"]> : T

If T is a IDeref, returns its value type or else T.

Type parameters

  • T

DerefedKeys

DerefedKeys<T, K>: {}

Constructs a type with a set of properties K of type T and attempts to resolve each given key via Derefed.

example
interface Foo {
    a: IDeref<string>;
    b: IDeref<number>;
    c: { d: number };
}

type Foo2 = DerefedKeys<Foo>;
// { a: string; b: number; c: { d: number; } }

type Foo3 = DerefedKeys<Foo, "b">;
// { b: number; }

Type parameters

Type declaration

    MaybeDeref

    MaybeDeref<T>: IDeref<T> | T

    Type parameters

    • T

    Functions

    Const deref

    Const isDeref

    • isDeref(x: any): x is IDeref<any>

    Generated using TypeDoc