composeTemplates
composeTemplates(…
templates):EntityTemplate
Defined in: src/template.ts:25
Compose multiple templates into one. Later templates override earlier ones:
nameis taken from the last template (so extending a base and renaming produces a sensibly-named descendant).componentsare shallow-merged by component name — later wins, earlier is kept when a later template does not redeclare that component. No deep merge: if two templates both declare"fighter", the later value replaces the earlier one wholesale.tagsare unioned across all inputs (insertion order, de-duplicated).
Passing zero templates throws — an anonymous empty template is never what a caller wants. Passing one template returns a new object equivalent to the input.
Parameters
Section titled “Parameters”templates
Section titled “templates”…readonly EntityTemplate[]