Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

824 B
Raw Blame
type ActionResultForKind<TKind> = TKind extends "create"
  ? ActionResultForCreate
  : TKind extends "update"
    ? ActionResultForUpdate
    : TKind extends "delete"
      ? ActionResultForDelete
      : TKind extends "sql"
        ? ActionResultForSql
        : AnyActionResult;

Maps an ActionKind literal to the discriminated result shape. Omit TKind (undefined) to fall back to the AnyActionResult union.

Type Parameters

Type Parameter
TKind extends ActionKind | undefined