• Registers any number of registrations of a single type. Any other registration type can be used.

    Note: Not all registration types have been tested. If you run into any issues with one report a bug!

    Example

    const itemColors = ["red", "blue", "green"];
    class Mod {
    @Register.bulk("item", ...itemColors
    .map(color => Tuple(`${color}Item`, { weight: 1 })))
    public readonly items: ItemType[];
    }

    Type Parameters

    • REG_TYPE extends "message" | "item" | "overlay" | "dialog" | "load" | "action" | "prompt" | "language" | "stat" | "skill" | "biome" | "creature" | "bindable" | "terrain" | "doodad" | "npc" | "note" | "statusEffect" | "quest" | "dictionary" | "worldLayer" | "equipType" | "tileEvent" | "itemGroup" | "registry" | "languageExtension" | "musicTrack" | "soundEffect" | "packet" | "helpArticle" | "terrainDecoration" | "quadrantComponent" | "interruptChoice" | "messageSource" | "inspectionType" | "menuBarButton" | "doodadGroup" | "tileLayer" | "questRequirement" | "magicalProperty" | "itemTag" | "doodadTag" | "entityTag" | "usableActions" | "usableActionType" | "usableActionTypePlaceholder" | "interModRegistry" | "interModRegistration" | "override" | "bulk" | "command" | "optionsSection"

    • REG extends AnyFunction<any> = typeof default[REG_TYPE]

    Parameters

    • type: REG_TYPE

      The type of registration to register — the name of another @Register.<type> decorator.

    • Rest ...entries: Parameters<REG>[]

      The registration definitions — each entry is a tuple containing the parameters that would be given to the registration decorator.

    Returns (<K, T>(target: T, key: K) => void)

      • <K, T>(target: T, key: K): void
      • Type Parameters

        • K extends string | number | symbol

        • T extends Record<K, ExtractRegisteredType<REG>[]>

        Parameters

        • target: T
        • key: K

        Returns void

Generated using TypeDoc