PokéRogue
    Preparing search index...

    Type Alias CoerceNullPropertiesToUndefined<T>

    CoerceNullPropertiesToUndefined: {
        [K in keyof T]: null extends T[K]
            ? Exclude<T[K], null>
            | undefined
            : T[K]
    }

    Type helper that iterates through the fields of the type and coerces any null properties to undefined (including in union types).

    Type Parameters

    • T extends object

    This is primarily useful when an object with nullable properties wants to be serialized and have its null properties coerced to undefined.