---
title: ValidDocParamTypes
description: Ensures the type of parameters defined in LiquidDoc are valid.
source_url:
  html: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-doc-param-types
  md: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-doc-param-types.md
api_name: liquid
---

# Valid​Doc​Param​Types

Each parameter defined in [LiquidDoc](https://shopify.dev/docs/storefronts/themes/tools/liquid-doc) should be `string`, `number`, `boolean`, `object`, or any [liquid object](https://shopify.dev/docs/api/liquid/objects) that isn't exclusively a global object. Parameter types are optional, and are surrounded by curly braces. Add square brackets,`[]`, after the type to denote a typed array.

***

## Examples

The following examples contain code snippets that either fail or pass this check.

### ✗ Fail

The following example shows multiple parameters with invalid types:

```liquid
{% doc %}
  @param {custom} param1
  @param {fake} param2
{% enddoc %}
```

### ✗ Fail

The following example shows multidimensional arrays:

```liquid
{% doc %}
  @param {string[][]} string_matrix
{% enddoc %}
```

### ✓ Pass

The following example shows multiple parameters with valid basic types:

```liquid
{% doc %}
  @param {string} some_str
  @param {number} some_num
  @param {boolean} some_bool
  @param {object} some_obj
  @param some_untyped
{% enddoc %}
```

### ✓ Pass

The following example shows multiple parameters with valid liquid objects as their type:

```liquid
{% doc %}
  @param {product} special_product
  @param {color} favorite_color
  @param {currency} preferred_currency
{% enddoc %}
```

### ✓ Pass

The following example shows parameter types with arrays:

```liquid
{% doc %}
  @param {product[]} special_products
  @param {string[]} array_of_strings
{% enddoc %}
```

***

## Options

The following example contains the default configuration for this check:

```yaml
ValidDocParamTypes:
  enabled: true
  severity: error
```

| Parameter | Description |
| - | - |
| `enabled` | Whether this check is enabled. |
| `severity` | The [severity](https://shopify.dev/docs/storefronts/themes/tools/theme-check/configuration#check-severity) of the check. |

***

## Disabling this check

Disabling this check isn't recommended.

***
