@servicenow/sdk - v4.9.0
    Preparing search index...
    WithTableName: T extends readonly any[]
        ? T
        : T extends Function
            ? T
            : T extends string
            | boolean
            | number
            | bigint
            | symbol
            | null
            | undefined
                ? T
                : T extends object
                    ? { [K in keyof T]: WithTableName<T[K]> } & { _tableName: any }
                    : T

    Recursively adds a _tableName property to every object in the type tree. Applied to record reference types so users can access ._tableName to get the platform .:TN pill suffix (the table name of the record at this path).

    Arrays and functions are left unchanged. Primitives are left unchanged. Uses T extends object (not Record) so interfaces work correctly.

    Primitive-backed intersections like boolean & Record<string, FlowValueType> (produced by BooleanColumn/IntegerColumn outputs) satisfy T extends object via their Record component, so we explicitly guard against all TypeScript primitives before the object branch to prevent primitive output types from gaining _tableName.

    Type Parameters

    • T