Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "wordpress-packages/utils/lib/helpers"

Index

Type aliases

AllKeyOf

AllKeyOf<T>: T extends never ? never : keyof T

Type parameters

  • T

ExtractGeneric

ExtractGeneric<Type>: Type extends TypeWithGeneric<infer X> ? X : never

Type parameters

  • Type

Optional

Optional<T, K>: {}

Type parameters

  • T

  • K

Type declaration

TypeWithGeneric

TypeWithGeneric<T>: T[]

Type parameters

  • T

WithOptional

WithOptional<T, K>: T extends never ? never : Omit<T, K> & Optional<T, K>

Type parameters

Functions

Const getWebpackPublicPath

  • getWebpackPublicPath(slug: string): string
  • You need to manually put the following code snippet in each of your entry points to enable "on the fly" public path for chunks:

    __webpack_public_path__ = getWebpackPublicPath(process.env.slug);
    
    see

    https://webpack.js.org/guides/public-path/#on-the-fly

    Parameters

    • slug: string

    Returns string

Const trailingslashit

  • trailingslashit(str: string): string
  • Parameters

    • str: string

    Returns string

Const untrailingslashit

  • untrailingslashit(str: string): string
  • Parameters

    • str: string

    Returns string

Generated using TypeDoc