Canboat ts-pgns
    Preparing search index...

    Function createPGN

    • Creates a PGN object using the specified identifier and fields.

      This function looks up a creator function based on the provided id from the pgnIdToCreator mapping. If a matching creator is found, it is invoked with the given fields and optional dst parameter. If no creator is found for the given id, the function returns undefined.

      Parameters

      • id: string

        The identifier used to select the PGN creator function.

      • fields: any

        The fields to be passed to the creator function.

      • dst: undefined | number = undefined

        An optional destination number to be passed to the creator function.

      Returns undefined | PGN

      The created PGN object, or undefined if no creator is found for the given id.