Homepage

ValidDocParamTypes

Last edit: Aug 14, 2026

ValidDocParamTypes

Severity: error | Type: LiquidHtml

This check ensures that type annotations in {% doc %} tag @param entries are valid platformOS types. Invalid type names prevent tooling (autocomplete, type checking) from working correctly and indicate a mistake in the documentation.

Valid types are read from the platformOS docset, which publishes them in liquid_doc.json — so this check accepts exactly the types the platform documents, and the doc tag reference lists them with their descriptions. They are:

  • the primitive types string, number and boolean;
  • date and time, the types to_date and to_time return;
  • the generic types object (anything that is not a primitive) and array (a list of values of any type);
  • the name of an object from the platformOS objects reference, for example page, current_user or params — except the objects the platform supplies to a file directly and that are therefore never passed as arguments: context (in scope everywhere), content_for_layout (layouts only), and data and response (api_calls only);
  • any of the above with a [] suffix, to describe an array of that type — string[], number[], object[].

A docset published before liquid_doc.json existed carries no type list, and then this check reports nothing rather than reporting every annotation as invalid.

Type names are lowercase. Integer, Float, Hash and String are not platformOS types.

Examples

✗ Incorrect Code Example (Avoid using this):


{% doc %}
  @param {Integer} count - A count value
  @param {txt} label - A label string
{% enddoc %}

Integer and txt are not valid platformOS types.

✓ Correct Code Example (Use this instead):


{% doc %}
  @param {number} count - A count value
  @param {string} label - A label string
  @param {number[]} ids - A list of numeric ids
  @param {array} rows - A list of mixed values
{% enddoc %}

Configuration

The default configuration for this check:

ValidDocParamTypes:
  enabled: true
  severity: error

Disabling This Check

Disabling this check is not recommended. Run pos-cli check update-docs to refresh the platformOS docset if you are getting false positives after a platform update.

Resources

Questions?

We are always happy to help with any questions you may have.

contact us