es-stl - v3.0.3
    Preparing search index...

    Type Alias OptionalKeys<T, Keys>

    OptionalKeys: Omit<T, Keys> & Partial<Pick<T, Keys>>

    Object type with selected properties made optional.

    Type Parameters

    • T

      Source object type.

    • Keys extends keyof T

      Properties made optional.

    type Options = OptionalKeys<{ host: string; port: number }, 'port'>;
    const options: Options = { host: 'localhost' };