@servicenow/sdk - v4.4.1
    Preparing search index...
    WithNowId: F extends (...args: infer P) => infer R
        ? (context: WithID<{ annotation?: string }>, ...args: P) => R
        : never

    Prepends a $id context parameter to an existing function type while preserving all original arguments and return type.

    Type Parameters

    • F extends (...args: any[]) => any

      The original function type to wrap.

    type Original = (a: number, b: number) => string;
    type WithId = WithNowId<Original>;
    // Result:
    // (context: Now.Internal.WithID<{ annotation?: string }>, a: number, b: number) => string