Template:Type: Difference between revisions

From FiguraMC
PenguinEncounter (talk | contribs)
switch to module (part 1 of ?)
Tag: 2017 source edit
PenguinEncounter (talk | contribs)
No edit summary
Tag: 2017 source edit
Line 20: Line 20:
* {{type|Event}} (custom type that exists)
* {{type|Event}} (custom type that exists)
* {{type|CrashAPI}} (custom type that doesn't exist)
* {{type|CrashAPI}} (custom type that doesn't exist)
* {{type|Main Page|link=Main Page}} (links to the [[Main Page]]) <code><nowiki>{{type|Main Page|link=Main Page}}</nowiki></code>
* {{type|Main Page|link=Event}} (links to [[Event]]) <code><nowiki>{{type|Main Page|link=Event}}</nowiki></code>
[[Template:Type/testcases|Testcases page.]]
[[Template:Type/testcases|Testcases page.]]
<templatedata>
<templatedata>

Revision as of 20:05, 28 September 2024

Displays a type widget.

Stylesheet: Template:Type/style.css (edit to add colors and decorations for custom types)

Examples

  • nil {{type|nil}}
  • number
  • number | nil (optional number)
  • string
  • boolean
  • function
  • table
  • Vector (Vector2, Vector3, Vector4)
  • Matrix (Matrix2, Matrix3, Matrix4)
  • Event (custom type that exists)
  • CrashAPI (custom type that doesn't exist)
  • Main Page (links to Event) {{type|Main Page|link=Event}}

Testcases page.

Displays and links to types.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Type name1

no description

Suggested values
nil boolean integer number string function table Vector Matrix
Unknownrequired
Type modifiersmod 2

Modifiers to the type, like array / optional

Suggested values
[] ? []?
Contentoptional
Custom link targetlink 3

no description

Page nameoptional