ExcludeProps

Syntax

type ExcludeProps<T, U>

Excludes from T the properties whose values are assignable to U.

Example

import { ExcludeProps } from 'potence';

interface A {
    a: string;
    b: string;
    c: number;
    d: Date;
}

ExcludeProps<A, string>  // -> { c: number, d: Date }

Remarks

This type is similar to Omit<T, U>. However, Omit<T, U> filters properties based on their keys, whereas this type filters properties based on their values.

This type does not currently work well with union or inherited types.