Sanity Library Reference Docs
    Preparing search index...

    Function removeUndefinedLocaleResources

    • Removes any values that are undefined from the given object.

      This is used to remove any placeholders from the generated files, while being able to leave them in place to ease spotting the missing translations.

      Type Parameters

      • T extends { [key: string]: string }

      Parameters

      • resources: T

        The resources to remove undefined values from

      Returns { [K in string | number | symbol]: Exclude<T[K], undefined> }

      The resources without any undefined values