Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

twine / itemOf

Function: itemOf() โ€‹

itemOf(item): ItemParts

Defined in: twine/src/item/pack.ts:13

The parts of an item class: the item, its give, holders and upgrades.

ctx.call(itemOf(CrossbowItem).give);

Usable from any module, since items register first. Throws if the item isn't in the build.

Parameters โ€‹

item โ€‹

ItemClassRef

Returns โ€‹

ItemParts

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.