Hyperlinkv0.8.0-beta.28

Types

Types.NotFunctiontypeeffect/Types.ts:786
NotFunction<T>

Excludes function types from a union, keeping only non-function members.

When to use

Use to filter out callable types from a union.

Details

Returns never if the entire union consists of function types.

Example (Filtering out functions)

import type { Types } from "effect"

type Result = Types.NotFunction<string | (() => void) | number>
// string | number
types
Source effect/Types.ts:7861 lines
export type NotFunction<T> = T extends Function ? never : T
Referenced by 2 symbols