OptionalOrFalse<T>: {
    [P in keyof T]?: false | T[P]
}

allow the value to be false, to refuse the merge from the parent

Type Parameters

  • T

    the Record where all keys can be falsifiable

Example

type myType = {
foo: string;
bar: string;
}

type myFalsifiableType = OptionalOrFalse<myType>;
myFalsifiableType = {
foo?: string | false;
bar?: string | false;
}