This class represents all the PCDs a user may have, and also contains references to all the relevant PCDPackages, which allows this class to effectively make use of all of the PCDs.

Constructors

  • Parameters

    • packages: PCDPackage<any, any, any, any>[]
    • Optional pcds: PCD<unknown, unknown>[]
    • Optional folders: Record<string, string>

    Returns PCDCollection

Properties

changeEmitter: Emitter<void>

Emits an event whenever the contents of this PCDCollection changes. Does not attempt to filter out changes which result in the same contents.

folders: Record<string, string>
packages: PCDPackage<any, any, any, any>[]
pcds: PCD<unknown, unknown>[]

Methods

  • Parameters

    • pcd: PCD<unknown, unknown>
    • Optional options: AddPCDOptions

    Returns void

  • Parameters

    • pcds: PCD<unknown, unknown>[]
    • Optional options: AddPCDOptions

    Returns void

  • Parameters

    • pcdIds: string[]
    • folder: string

    Returns void

  • Removes all PCDs within a given folder, and optionally within all subfolders.

    Parameters

    • folder: string
    • recursive: boolean

    Returns void

  • Parameters

    Returns Promise<void>

  • Parameters

    Returns Promise<void>

  • Returns void

  • Returns PCD<unknown, unknown>[]

  • Returns string[]

  • Returns string[]

  • Parameters

    • folder: string

    Returns PCD<unknown, unknown>[]

  • Parameters

    • id: string

    Returns undefined | PCD<unknown, unknown>

  • Parameters

    • ids: string[]

    Returns PCD<unknown, unknown>[]

  • Parameters

    • pcdId: string

    Returns undefined | string

  • Parameters

    • folderPath: string

    Returns string[]

  • Generates a unique hash based on the contents. This hash changes whenever the set of pcds, or the contents of the pcds changes.

    Returns Promise<string>

  • Parameters

    • type: string

    Returns PCD<unknown, unknown>[]

  • Type Parameters

    Parameters

    • name: string

    Returns undefined | T

  • Returns number

  • Parameters

    • id: string

    Returns boolean

  • Parameters

    • name: string

    Returns boolean

  • Parameters

    • folderPath: string

    Returns boolean

  • Merges another PCD collection into this one. There is one option:

    • shouldInclude is a function used to filter out PCDs from the other collection during merging, e.g. to filter out duplicates or PCDs of a type that should not be copied.

    Parameters

    Returns void

  • Parameters

    • pcdId: string

    Returns Promise<void>

  • Parameters

    • folder: string

    Returns void

  • Parameters

    • folder: string
    • pcds: PCD<unknown, unknown>[]

    Returns void

  • Parameters

    • pcd: PCD<unknown, unknown>

    Returns Promise<SerializedPCD<PCD<unknown, unknown>>>

  • Returns Promise<string>

  • Parameters

    • pcdId: string
    • folder: string

    Returns void

  • Parameters

    • pcdId: string
    • folder: string

    Returns void

  • Returns number

  • Parameters

    Returns Promise<boolean>

  • Parameters

    Returns Promise<boolean>

Generated using TypeDoc