oko-management
    Preparing search index...
    • Creates a function that retrieves labels based on given keys from a provided dictionary.

      Type Parameters

      • T extends string

      Parameters

      • labels: Record<T, string>

        A dictionary where keys are of type T and values are strings representing labels.

      Returns (key: T) => Record<T, string>[T]

      A function that takes a key of type T and returns its corresponding label or the key itself if no label is found.