@servicenow/sdk - v4.4.1
    Preparing search index...
    NowId: {
        [K in keyof T]: T[K] extends (...args: any[]) => any
            ? WithNowId<T[K]>
            : T[K]
    }

    For each property in type T:

    • If the property is a function, prepend a $id context parameter.
    • If it's not a function, leave it unchanged.

    Type Parameters

    • T
    interface MathFns {
    add: (a: number, b: number) => number;
    version: string;
    }

    type MathWithId = NowId<MathFns>;
    // {
    // add: (context: { $id: string, annotation?: string }, a: number, b: number) => number;
    // version: string;
    // }